[llvm] r318594 - [X86] Add todo comment for TRUNC(SUB(X, C)) -> SUB(TRUNC(X), C')

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 10:33:07 PST 2017


Author: rksimon
Date: Sat Nov 18 10:33:07 2017
New Revision: 318594

URL: http://llvm.org/viewvc/llvm-project?rev=318594&view=rev
Log:
[X86] Add todo comment for TRUNC(SUB(X,C)) -> SUB(TRUNC(X),C')

As discussed on PR35295, but it causes regressions in combineSubToSubus which need to be addressed first 

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=318594&r1=318593&r2=318594&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Nov 18 10:33:07 2017
@@ -34482,6 +34482,7 @@ static SDValue combineTruncatedArithmeti
       return TruncateArithmetic(Src.getOperand(0), Src.getOperand(1));
     LLVM_FALLTHROUGH;
   case ISD::ADD: {
+    // TODO: ISD::SUB should be here but interferes with combineSubToSubus.
     SDValue Op0 = Src.getOperand(0);
     SDValue Op1 = Src.getOperand(1);
     if (TLI.isOperationLegal(Opcode, VT) &&




More information about the llvm-commits mailing list