[llvm-branch-commits] X86: Add X86TargetLowering::isProfitableToHoist hook for immediate operands. (PR #141326)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri May 23 20:15:10 PDT 2025
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141326
Casts taking a constant expression (generally derived from a global
variable address) as an operand are not profitable to CSE because they
appear as subexpressions in the instruction sequence generated by the
LowerTypeTests pass which is expected to pattern match to the rotate
instruction. These casts are expected to be code generated into the
instruction's immediate operand, so there is no benefit to hoisting
them anyway.
More information about the llvm-branch-commits
mailing list