[llvm] [X86] Avoid shl->mul lowbit-isolate fold when BMI1/BMI2 are available (PR #217776)
PJ Dailey via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 10:26:53 PDT 2026
PjDailey11 wrote:
> Using a BMI1/BMI2 check will still improperly apply this fold to bdver2, bdver3, and btver2 because they don't have BMI2 but would still prefer TZCNT. It might be better to check only BMI1 because Intel didn't make CPUs with only BMI1 like AMD.
Okay, just checked `bdver2`/`bdver3`/`btver2` and saw they have `BMI1`. I understand because the only reason to have `BMI2` was to have `SHLX`. I will switch it to `hasBMI()` instead
https://github.com/llvm/llvm-project/pull/217776
More information about the llvm-commits
mailing list