[PATCH] D69038: [InstCombine] Fix miscompile bug in canEvaluateShuffled
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 11:33:34 PDT 2019
spatel accepted this revision.
spatel added a comment.
LGTM with minor fixes as suggested.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1068
+ case Instruction::SRem:
+ // Avoid introducing integer div/rem by undef to avoid undefined behavior.
+ for (int i = 0, e = Mask.size(); i != e; ++i)
----------------
This comment could provide a better explanation. Something like:
// Propagating an undefined shuffle mask element to integer
// div/rem is not allowed because those opcodes can create
// immediate undefined behavior from an undefined element
// in an operand.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69038/new/
https://reviews.llvm.org/D69038
More information about the llvm-commits
mailing list