[all-commits] [llvm/llvm-project] aeb504: [InstCombine] allow undef elements when comparing ...
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Jun 14 06:04:10 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: aeb50448019ce1b1002f3781f9647d486320d83c
https://github.com/llvm/llvm-project/commit/aeb50448019ce1b1002f3781f9647d486320d83c
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-06-14 (Sun, 14 Jun 2020)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/minmax-fold.ll
Log Message:
-----------
[InstCombine] allow undef elements when comparing vector constants for min/max bailout
This is a hacky, but low-risk fix to avoid the infinite loop in PR46271:
https://bugs.llvm.org/show_bug.cgi?id=46271
As discussed there, the problem is that FoldOpIntoSelect() can get into a conflict
with a transform that wants to pull a 'not' op through min/max via
SimplifyDemandedVectorElts(). We need to relax our matching of min/max to include
undefined elements in vector constants to avoid that. Alternatively, we could
improve or cripple the demanded elements analysis, but that could create even
more problems.
The likely better, safer alternative will be to create min/max intrinsics, so
we can remove all of the hacks related to min/max matching in instcombine.
Differential Revision: https://reviews.llvm.org/D81698
More information about the All-commits
mailing list