| ; bswap should be constant folded when it is passed a constant argument
|
| ; RUN: llc < %s -march=x86 -mcpu=i686 | FileCheck %s
|
| declare i16 @llvm.bswap.i16(i16)
|
| declare i32 @llvm.bswap.i32(i32)
|
| declare i64 @llvm.bswap.i64(i64)
|
| %Z = call i16 @llvm.bswap.i16( i16 %A ) ; <i16> [#uses=1]
|
| %Z = call i32 @llvm.bswap.i32( i32 %A ) ; <i32> [#uses=1]
|
| %Z = call i64 @llvm.bswap.i64( i64 %A ) ; <i64> [#uses=1]
|
| define i32 @test1(i32 %a) nounwind readnone {
|
| %shr3 = and i32 %and, 255
|
| %shl = and i32 %and2, 65280
|
| define i32 @test2(i32 %a) nounwind readnone {
|
| %shr4 = and i32 %and, 255
|
| %or = or i32 %shr4, %and2
|
| %conv3 = ashr exact i32 %sext, 16
|