[llvm-commits] [llvm] r158220 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Manman Ren
mren at apple.com
Fri Jun 8 11:58:27 PDT 2012
Author: mren
Date: Fri Jun 8 13:58:26 2012
New Revision: 158220
URL: http://llvm.org/viewvc/llvm-project?rev=158220&view=rev
Log:
Enable optimization for integer ABS on X86 if Subtarget has CMOV.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=158220&r1=158219&r2=158220&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jun 8 13:58:26 2012
@@ -14548,9 +14548,11 @@
if (DCI.isBeforeLegalizeOps())
return SDValue();
- SDValue RV = performIntegerAbsCombine(N, DAG);
- if (RV.getNode())
- return RV;
+ if (Subtarget->hasCMov()) {
+ SDValue RV = performIntegerAbsCombine(N, DAG);
+ if (RV.getNode())
+ return RV;
+ }
// Try forming BMI if it is available.
if (!Subtarget->hasBMI())
More information about the llvm-commits
mailing list