[llvm-commits] [llvm] r126661 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/fcopysign.ll
Evan Cheng
evan.cheng at apple.com
Mon Feb 28 10:45:28 PST 2011
Author: evancheng
Date: Mon Feb 28 12:45:27 2011
New Revision: 126661
URL: http://llvm.org/viewvc/llvm-project?rev=126661&view=rev
Log:
Fix a typo which cause dag combine crash. rdar://9059537.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
llvm/trunk/test/CodeGen/ARM/fcopysign.ll
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=126661&r1=126660&r2=126661&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Feb 28 12:45:27 2011
@@ -2905,7 +2905,7 @@
SDValue Res = DAG.getNode(ISD::OR, dl, OpVT,
DAG.getNode(ISD::AND, dl, OpVT, Tmp1, Mask),
DAG.getNode(ISD::AND, dl, OpVT, Tmp0, MaskNot));
- if (SrcVT == MVT::f32) {
+ if (VT == MVT::f32) {
Res = DAG.getNode(ISD::BITCAST, dl, MVT::v2f32, Res);
Res = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, MVT::f32, Res,
DAG.getConstant(0, MVT::i32));
Modified: llvm/trunk/test/CodeGen/ARM/fcopysign.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fcopysign.ll?rev=126661&r1=126660&r2=126661&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/fcopysign.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/fcopysign.ll Mon Feb 28 12:45:27 2011
@@ -40,5 +40,19 @@
ret double %1
}
+; rdar://9059537
+define i32 @test4() ssp {
+entry:
+; SOFT: test4:
+; SOFT: vcvt.f32.f64 s0,
+; SOFT: vmov.i32 [[REG4:(d[0-9]+)]], #0x80000000
+; SOFT: vbic [[REG5:(d[0-9]+))], d0, [[REG4]]
+; SOFT: vorr d0, [[REG4]], [[REG5]]
+ %call80 = tail call double @copysign(double 1.000000e+00, double undef)
+ %conv81 = fptrunc double %call80 to float
+ %tmp88 = bitcast float %conv81 to i32
+ ret i32 %tmp88
+}
+
declare double @copysign(double, double) nounwind
declare float @copysignf(float, float) nounwind
More information about the llvm-commits
mailing list