; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 34

int %test(int %X) {
	; Do not fold into shr X, 34, as this uses undefined behavior!
	%Y = shr int %X, ubyte 17
	%Z = shr int %Y, ubyte 17
	ret int %Z
}

; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 34

int %test(int %X) {
	; Do not fold into shr X, 34, as this uses undefined behavior!
	%Y = shr int %X, ubyte 17
	%Z = shr int %Y, ubyte 17
	ret int %Z
}

int %test2(int %X) {
	; Do not fold into shl X, 34, as this uses undefined behavior!
	%Y = shl int %X, ubyte 17
	%Z = shl int %Y, ubyte 17
	ret int %Z
}

Test for the other way also
Test for the other way also


git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@11767 91177308-0d34-0410-b5e6-96231b3b80d8
