[PATCH] D99283: [GlobalISel] Combine and (lshr x, cst), mask -> ubfx x, cst, width
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 18:55:23 PDT 2021
jroelofs added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp:289
+ int64_t AndImm;
+ if (!mi_match(MI.getOperand(2).getReg(), MRI, m_ICst(AndImm)) ||
+ (AndImm & (AndImm + 1)))
----------------
What is the range of `AndImm` at this point? I'm worried that we'll have UB if the addition overflows.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99283/new/
https://reviews.llvm.org/D99283
More information about the llvm-commits
mailing list