[PATCH] D72837: [AggressiveInstCombine] Add support for select instruction.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 05:07:40 PST 2020


aymanmus marked an inline comment as done.
aymanmus added inline comments.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp:203
           continue;
-        InstInfoMap[IOp].ValidBitWidth = std::max(ValidBitWidth, IOpBitwidth);
+        InstInfoMap[IOp].ValidBitWidth = ValidBitWidth;
         Worklist.push_back(IOp);
----------------
lebedev.ri wrote:
> Why is this being changed?
> 
The max operation is not needed here.
If we reach this point of the code, then ValidBitWidth MUST be bigger than IOpBitwidth (because other wise we'll hit the "continue" at line 202.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72837/new/

https://reviews.llvm.org/D72837





More information about the llvm-commits mailing list