[PATCH] D55883: [TargetLowering] Fix propagation of undefs in zero extension ops (PR40091)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 19 03:20:43 PST 2018
RKSimon created this revision.
RKSimon added reviewers: andreadb, dmgreen, spatel.
Herald added a subscriber: javed.absar.
As described on PR40091, we have several places where zext (and zext_vector_inreg) fold an undef input into an undef output. For zero extensions this incorrect as the output should guarantee to least have the new upper bits set to zero.
SimplifyDemandedVectorElts is the worst offender (and its the most likely to cause new undefs to appear) but DAGCombiner's tryToFoldExtendOfConstant has a similar issue.
Thanks to @dmgreen for catching this.
Repository:
rL LLVM
https://reviews.llvm.org/D55883
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/AArch64/pr40091.ll
test/CodeGen/X86/fold-vector-sext-zext.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55883.178860.patch
Type: text/x-patch
Size: 6329 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181219/5f69973b/attachment-0001.bin>
More information about the llvm-commits
mailing list