[PATCH] D31403: [SDAG] Deal with deleted node in PromoteIntShiftOp
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 13:04:55 PDT 2017
spatel added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1166-1169
+ if (Replace) {
+ AddToWorklist(N0.getNode());
ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode());
+ }
----------------
Only the 'PromoteOperand' path can set 'Replace' to true, right? Can you move this into that else clause, and move the 'Replace' declaration into that else clause too?
================
Comment at: test/CodeGen/X86/pr32420.ll:32-46
+ %cast = zext i1 %lnot to i32
+ %load2 = load i16, i16* getelementptr inbounds (%struct.S, %struct.S* @a, i64 0, i32 0), align 4
+ %shl3 = shl i16 %load2, 12
+ %ashr4 = ashr i16 %shl3, 12
+ %cast527 = trunc i16 %ashr4 to i8
+ %t2 = load volatile i8, i8* @c, align 1
+ %or = or i8 %t2, %cast527
----------------
The bug is triggered by the 16-bit shifts. Can you remove the memops, globals, and struct?
https://reviews.llvm.org/D31403
More information about the llvm-commits
mailing list