[llvm] r278750 - Fix typo in lowering for fp128 ueq.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 14:46:20 PDT 2016


Author: efriedma
Date: Mon Aug 15 16:46:19 2016
New Revision: 278750

URL: http://llvm.org/viewvc/llvm-project?rev=278750&view=rev
Log:
Fix typo in lowering for fp128 ueq.

Regression from r259791.

Differential Revision: https://reviews.llvm.org/D23374


Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    llvm/trunk/test/CodeGen/AArch64/arm64-fp128.ll

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=278750&r1=278749&r2=278750&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Aug 15 16:46:19 2016
@@ -216,7 +216,7 @@ void TargetLowering::softenSetCCOperands
   case ISD::SETUEQ:
     LC1 = (VT == MVT::f32) ? RTLIB::UO_F32 :
           (VT == MVT::f64) ? RTLIB::UO_F64 :
-          (VT == MVT::f128) ? RTLIB::UO_F64 : RTLIB::UO_PPCF128;
+          (VT == MVT::f128) ? RTLIB::UO_F128 : RTLIB::UO_PPCF128;
     LC2 = (VT == MVT::f32) ? RTLIB::OEQ_F32 :
           (VT == MVT::f64) ? RTLIB::OEQ_F64 :
           (VT == MVT::f128) ? RTLIB::OEQ_F128 : RTLIB::OEQ_PPCF128;

Modified: llvm/trunk/test/CodeGen/AArch64/arm64-fp128.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/arm64-fp128.ll?rev=278750&r1=278749&r2=278750&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/arm64-fp128.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/arm64-fp128.ll Mon Aug 15 16:46:19 2016
@@ -156,6 +156,28 @@ define i1 @test_setcc2() {
 ; CHECK: ret
 }
 
+define i1 @test_setcc3() {
+; CHECK-LABEL: test_setcc3:
+
+  %lhs = load fp128, fp128* @lhs, align 16
+  %rhs = load fp128, fp128* @rhs, align 16
+; CHECK: ldr q0, [{{x[0-9]+}}, :lo12:lhs]
+; CHECK: ldr q1, [{{x[0-9]+}}, :lo12:rhs]
+
+  %val = fcmp ueq fp128 %lhs, %rhs
+; CHECK: bl __eqtf2
+; CHECK: cmp     w0, #0
+; CHECK: cset    w19, eq
+; CHECK: bl __unordtf2
+; CHECK: cmp     w0, #0
+; CHECK: cset    w8, ne
+; CHECK: orr     w0, w8, w19
+
+  ret i1 %val
+; CHECK: ret
+}
+
+
 define i32 @test_br_cc() {
 ; CHECK-LABEL: test_br_cc:
 




More information about the llvm-commits mailing list