[PATCH] D64512: [InstCombine] Dropping redundant masking before left-shift [0/5] (PR42563)
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 06:37:22 PDT 2019
xbolva00 added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll:343
; CHECK-NEXT: call void @use32(i32 [[T2]])
; CHECK-NEXT: call void @use32(i32 [[T3]])
+; CHECK-NEXT: [[T4:%.*]] = shl i32 [[X]], [[T3]]
----------------
lebedev.ri wrote:
> xbolva00 wrote:
> > What about ‘exact’ ?
> In all these tests the last instruction is `shl`, not `lshr`; `shl` can only have `nuw`/`nsw`/`nuw nsw`.
> In any case, the new shift must not have any of these flags, because now that we have dropped masking,
> we no longer know that we won't shift-out non-0 bits.
> alive obviously agrees:
> https://rise4fun.com/Alive/NDG
> https://rise4fun.com/Alive/sliGT
> https://rise4fun.com/Alive/TWI5
> https://rise4fun.com/Alive/EiG
> https://rise4fun.com/Alive/Fsly
Thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64512/new/
https://reviews.llvm.org/D64512
More information about the llvm-commits
mailing list