[PATCH] D66057: [InstCombine] Shift amount reassociation in bittest: trunc-of-shl (PR42399)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 15:00:46 PDT 2019
spatel added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/shift-amount-reassociation-in-bittest-with-truncation-shl.ll:414
%t1 = lshr i32 %x, %t0
- %t2 = add i32 %len, 1 ; too much
+ %t2 = add i32 %len, 32 ; too much
%t2_wide = zext i32 %t2 to i64
----------------
Please explain and/or add a comment here.
If we leave the add constant as 1, this gets simplified away completely with this patch? Why doesn't it happen with 32?
Do we already have a test that covers the case for the original test (with add of 1)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66057/new/
https://reviews.llvm.org/D66057
More information about the llvm-commits
mailing list