[llvm-branch-commits] [llvm-branch] r126417 - in /llvm/branches/Apple/palisade: lib/Target/X86/X86InstrInfo.cpp test/CodeGen/X86/2011-02-23-UnfoldBug.ll

Daniel Dunbar daniel at zuster.org
Thu Feb 24 12:02:31 PST 2011


Author: ddunbar
Date: Thu Feb 24 14:02:31 2011
New Revision: 126417

URL: http://llvm.org/viewvc/llvm-project?rev=126417&view=rev
Log:
Merge r126359:
--
Author: Evan Cheng <evan.cheng at apple.com>
Date:   Thu Feb 24 02:36:52 2011 +0000

    Fix bug in X86 folding / unfolding table. Int_CMPSDrm and Int_CMPSSrm memory
    operands starts at index 2, not 1.
    rdar://9045024
    PR9305

Added:
    llvm/branches/Apple/palisade/test/CodeGen/X86/2011-02-23-UnfoldBug.ll
Modified:
    llvm/branches/Apple/palisade/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/branches/Apple/palisade/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/palisade/lib/Target/X86/X86InstrInfo.cpp?rev=126417&r1=126416&r2=126417&view=diff
==============================================================================
--- llvm/branches/Apple/palisade/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/branches/Apple/palisade/lib/Target/X86/X86InstrInfo.cpp Thu Feb 24 14:02:31 2011
@@ -369,8 +369,6 @@
     { X86::IMUL32rri8,      X86::IMUL32rmi8, 0 },
     { X86::IMUL64rri32,     X86::IMUL64rmi32, 0 },
     { X86::IMUL64rri8,      X86::IMUL64rmi8, 0 },
-    { X86::Int_CMPSDrr,     X86::Int_CMPSDrm, 0 },
-    { X86::Int_CMPSSrr,     X86::Int_CMPSSrm, 0 },
     { X86::Int_COMISDrr,    X86::Int_COMISDrm, 0 },
     { X86::Int_COMISSrr,    X86::Int_COMISSrm, 0 },
     { X86::Int_CVTDQ2PDrr,  X86::Int_CVTDQ2PDrm, 16 },
@@ -568,6 +566,8 @@
     { X86::IMUL16rr,        X86::IMUL16rm, 0 },
     { X86::IMUL32rr,        X86::IMUL32rm, 0 },
     { X86::IMUL64rr,        X86::IMUL64rm, 0 },
+    { X86::Int_CMPSDrr,     X86::Int_CMPSDrm, 0 },
+    { X86::Int_CMPSSrr,     X86::Int_CMPSSrm, 0 },
     { X86::MAXPDrr,         X86::MAXPDrm, 16 },
     { X86::MAXPDrr_Int,     X86::MAXPDrm_Int, 16 },
     { X86::MAXPSrr,         X86::MAXPSrm, 16 },

Added: llvm/branches/Apple/palisade/test/CodeGen/X86/2011-02-23-UnfoldBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/palisade/test/CodeGen/X86/2011-02-23-UnfoldBug.ll?rev=126417&view=auto
==============================================================================
--- llvm/branches/Apple/palisade/test/CodeGen/X86/2011-02-23-UnfoldBug.ll (added)
+++ llvm/branches/Apple/palisade/test/CodeGen/X86/2011-02-23-UnfoldBug.ll Thu Feb 24 14:02:31 2011
@@ -0,0 +1,42 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin10
+; rdar://9045024
+; PR9305
+
+define void @calc_gb_rad_still_sse2_double() nounwind ssp {
+entry:
+  br label %for.cond.outer
+
+for.cond.outer:                                   ; preds = %if.end71, %entry
+  %theta.0.ph = phi <2 x double> [ undef, %entry ], [ %theta.1, %if.end71 ]
+  %mul.i97 = fmul <2 x double> %theta.0.ph, undef
+  %mul.i96 = fmul <2 x double> %mul.i97, fmul (<2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> undef)
+  br i1 undef, label %for.body, label %for.end82
+
+for.body:                                         ; preds = %for.cond.outer
+  br i1 undef, label %for.body33.lr.ph, label %for.end
+
+for.body33.lr.ph:                                 ; preds = %for.body
+  %dccf.2 = select i1 undef, <2 x double> %mul.i96, <2 x double> undef
+  unreachable
+
+for.end:                                          ; preds = %for.body
+  %vecins.i94 = insertelement <2 x double> undef, double 0.000000e+00, i32 0
+  %cmpsd.i = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %vecins.i94, <2 x double> <double 0x3FE984B204153B34, double 0x3FE984B204153B34>, i8 2) nounwind
+  tail call void (...)* @_mm_movemask_pd(<2 x double> %cmpsd.i) nounwind
+  br i1 undef, label %if.then67, label %if.end71
+
+if.then67:                                        ; preds = %for.end
+  %vecins.i91 = insertelement <2 x double> %vecins.i94, double undef, i32 0
+  br label %if.end71
+
+if.end71:                                         ; preds = %if.then67, %for.end
+  %theta.1 = phi <2 x double> [ %vecins.i91, %if.then67 ], [ %theta.0.ph, %for.end ]
+  br label %for.cond.outer
+
+for.end82:                                        ; preds = %for.cond.outer
+  ret void
+}
+
+declare void @_mm_movemask_pd(...)
+
+declare <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double>, <2 x double>, i8) nounwind readnone





More information about the llvm-branch-commits mailing list