Skip to content

[sinking] testcase that needs sinking enabled #3578

@ohmantics

Description

@ohmantics
Bugzilla Link 3206
Version unspecified
OS MacOS X
CC @ohmantics,@asl

Extended Description

On i386-apple-darwin, built with "llvmc -O3 -S select_reduced.c" with or without -clang. At the end of each case should be a select/cmov.

inline attribute((always_inline))
unsigned short _OSSwapInt16(unsigned short _data)
{
return ((_data << 8) | (_data >> 8));
}

inline attribute((always_inline))
unsigned short ReadSwapShort(unsigned char* data, unsigned int offset)
{
return _OSSwapInt16((unsigned short) &data[offset]);
}

unsigned short* myfunc(unsigned short* endCodes, unsigned short probe, unsigned short entrySelector, unsigned short c)
{
#define PROBE_SHIFT
{
probe >>= 1;
if (c > _OSSwapInt16(endCodes[probe >> 1]))
endCodes = &endCodes[probe >> 1];
}

switch (entrySelector)
{
	case 15:	PROBE_SHIFT;	// FALL-THRU
	case 14:	PROBE_SHIFT;	// FALL-THRU
	case 13:	PROBE_SHIFT;	// FALL-THRU
	case 12:	PROBE_SHIFT;	// FALL-THRU
	case 11:	PROBE_SHIFT;	// FALL-THRU
	case 10:	PROBE_SHIFT;	// FALL-THRU
	case  9:	PROBE_SHIFT;	// FALL-THRU
	case  8:	PROBE_SHIFT;	// FALL-THRU
	case  7:	PROBE_SHIFT;	// FALL-THRU
	case  6:	PROBE_SHIFT;	// FALL-THRU
	case  5:	PROBE_SHIFT;	// FALL-THRU
	case  4:	PROBE_SHIFT;	// FALL-THRU
}

return endCodes;    

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions