diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/PowerPC/rm-zext.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/rm-zext.ll b/llvm/test/CodeGen/PowerPC/rm-zext.ll index 8fab38ad4cf..291b7919280 100644 --- a/llvm/test/CodeGen/PowerPC/rm-zext.ll +++ b/llvm/test/CodeGen/PowerPC/rm-zext.ll @@ -39,5 +39,35 @@ entry: ; CHECK: blr } +; Function Attrs: nounwind readnone +declare i32 @llvm.bswap.i32(i32) #1 + +; Function Attrs: nounwind readonly +define zeroext i32 @bs32(i32* nocapture readonly %x) #0 { +entry: + %0 = load i32* %x, align 4 + %1 = tail call i32 @llvm.bswap.i32(i32 %0) + ret i32 %1 + +; CHECK-LABEL: @bs32 +; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32 +; CHECK: blr +} + +; Function Attrs: nounwind readonly +define zeroext i16 @bs16(i16* nocapture readonly %x) #0 { +entry: + %0 = load i16* %x, align 2 + %1 = tail call i16 @llvm.bswap.i16(i16 %0) + ret i16 %1 + +; CHECK-LABEL: @bs16 +; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32 +; CHECK: blr +} + +; Function Attrs: nounwind readnone +declare i16 @llvm.bswap.i16(i16) #1 + attributes #0 = { nounwind readnone } |