diff options
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/int-cmp-55.ll')
-rw-r--r-- | llvm/test/CodeGen/SystemZ/int-cmp-55.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-55.ll b/llvm/test/CodeGen/SystemZ/int-cmp-55.ll new file mode 100644 index 00000000000..5028784197d --- /dev/null +++ b/llvm/test/CodeGen/SystemZ/int-cmp-55.ll @@ -0,0 +1,19 @@ +; Check that we don't insert unnecessary CC spills +; +; RUN: llc < %s -mtriple=s390x-linux-gnu + +declare signext i32 @f() + +define signext i32 @test(i32* %ptr) { +; CHECK-NOT: ipm + +entry: + %0 = load i32, i32* %ptr, align 4 + %tobool = icmp eq i32 %0, 0 + %call = tail call signext i32 @f() + %1 = icmp slt i32 %call, 40 + %2 = or i1 %tobool, %1 + %retv = select i1 %2, i32 %call, i32 40 + ret i32 %retv +} + |