summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/int-cmp-05.ll
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-06 09:56:50 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-06 09:56:50 +0000
commit7b4118a0fcf1c99fb352cef9c297f97af7a35757 (patch)
treed8b9b8495f58ed30288b7a4a0466896a1939420c /llvm/test/CodeGen/SystemZ/int-cmp-05.ll
parent48ef6abddc90162bdfa045dd793fb56803c2a62f (diff)
downloadbcm5719-llvm-7b4118a0fcf1c99fb352cef9c297f97af7a35757.tar.gz
bcm5719-llvm-7b4118a0fcf1c99fb352cef9c297f97af7a35757.zip
[SystemZ] Extend the use of C(L)GFR
instcombine prefers to put extended operands first, so this patch handles that case for C(L)GFR. llvm-svn: 196579
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/int-cmp-05.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/int-cmp-05.ll17
1 files changed, 15 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-05.ll b/llvm/test/CodeGen/SystemZ/int-cmp-05.ll
index f15b76bb87f..0be43a3ef1b 100644
--- a/llvm/test/CodeGen/SystemZ/int-cmp-05.ll
+++ b/llvm/test/CodeGen/SystemZ/int-cmp-05.ll
@@ -291,9 +291,22 @@ define i64 @f15(i32 *%ptr0) {
ret i64 %sel9
}
-; Check the comparison can be reversed if that allows CGF to be used.
-define double @f16(double %a, double %b, i64 %i2, i32 *%ptr) {
+; Check the comparison can be reversed if that allows CGFR to be used.
+define double @f16(double %a, double %b, i64 %i1, i32 %unext) {
; CHECK-LABEL: f16:
+; CHECK: cgfr %r2, %r3
+; CHECK-NEXT: jh
+; CHECK: ldr %f0, %f2
+; CHECK: br %r14
+ %i2 = sext i32 %unext to i64
+ %cond = icmp slt i64 %i2, %i1
+ %res = select i1 %cond, double %a, double %b
+ ret double %res
+}
+
+; Likewise CGF.
+define double @f17(double %a, double %b, i64 %i2, i32 *%ptr) {
+; CHECK-LABEL: f17:
; CHECK: cgf %r2, 0(%r3)
; CHECK-NEXT: jh {{\.L.*}}
; CHECK: ldr %f0, %f2
OpenPOWER on IntegriCloud