[PATCH] D64512: [InstCombine] Dropping redundant masking before left-shift [0/5] (PR42563)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 06:35:33 PDT 2019
lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.
@spatel any 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]]
----------------
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
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