[PATCH] D88429: [InstCombine] visitTrunc - trunc (*shr (trunc A), C) --> trunc(*shr A, C)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 06:57:53 PDT 2020
lebedev.ri added a comment.
Please can you post the alive proof you're basing this on?
I don't understand how you arrived at that precondition,
i think it should be much simpler: https://rise4fun.com/Alive/zpJn
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:859
+ unsigned AWidth = AType->getScalarSizeInBits();
+ unsigned MaxShiftAmt = std::min<unsigned>(DestWidth, AWidth - DestWidth);
+
----------------
I do not understand why this isn't just `unsigned MaxShiftAmt = AWidth - DestWidth;`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88429/new/
https://reviews.llvm.org/D88429
More information about the llvm-commits
mailing list