[llvm] r237843 - Revert r237828 "[X86] Remove unused node after morphing it from shr to and."
Hans Wennborg
hans at hanshq.net
Wed May 20 15:31:55 PDT 2015
Author: hans
Date: Wed May 20 17:31:55 2015
New Revision: 237843
URL: http://llvm.org/viewvc/llvm-project?rev=237843&view=rev
Log:
Revert r237828 "[X86] Remove unused node after morphing it from shr to and."
This caused assertions during DAG combine: PR23601.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/cmp.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=237843&r1=237842&r2=237843&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed May 20 17:31:55 2015
@@ -12737,7 +12737,6 @@ SDValue X86TargetLowering::EmitTest(SDVa
SDValue New = DAG.getNode(ISD::AND, dl, VT, Op->getOperand(0),
DAG.getConstant(Mask, dl, VT));
DAG.ReplaceAllUsesWith(Op, New);
- DAG.RemoveDeadNode(Op.getNode());
Op = New;
}
break;
Modified: llvm/trunk/test/CodeGen/X86/cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/cmp.ll?rev=237843&r1=237842&r2=237843&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/cmp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/cmp.ll Wed May 20 17:31:55 2015
@@ -211,20 +211,3 @@ define zeroext i1 @test15(i32 %bf.load,
; CHECK: shrl $16, %edi
; CHECK: cmpl %esi, %edi
}
-
-; PR23353
-define i1 @test16(i32* %a, i1* %b) {
- %load = load i32, i32* %a
- %trunc = trunc i32 %load to i8
- %mul = mul i8 %trunc, 2
- %icmp1 = icmp ne i8 %mul, 0
- store i1 %icmp1, i1* %b
- %and = and i8 %trunc, 127
- %icmp2 = icmp ne i8 %and, 0
- ret i1 %icmp2
-
-; CHECK-LABEL: test16:
-; CHECK-NOT: addb
-; CHECK-NOT: andb
-; CHECK: testb $127
-}
More information about the llvm-commits
mailing list