[PATCH] D130075: [InstCombine] Try not to demand low order bits for Add

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 03:43:06 PDT 2022


foad added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll:302
+; AUTO_VEC-NEXT:    [[TMP1:%.*]] = add nsw i64 [[SMAX]], -16
+; AUTO_VEC-NEXT:    [[TMP2:%.*]] = lshr i64 [[TMP1]], 4
 ; AUTO_VEC-NEXT:    [[TMP3:%.*]] = add nuw nsw i64 [[TMP2]], 1
----------------
fhahn wrote:
> Is dropping `exact` here intentional? 
> 
> It looks like we are missing a dedicated instcombine test for this scenario?
> Is dropping exact here intentional?

Yes, because the value we are shifting is now based on SMAX (an arbitrary i64 value) instead of N_VEC which is SMAX & 0x7ffffffffffffff0 (i.e. known to have 0 in the low bits).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130075



More information about the llvm-commits mailing list