[llvm] [AArch64] Improve urem by constant costs (PR #122236)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 07:19:48 PST 2025


================
@@ -893,7 +893,8 @@ TargetTransformInfo::getOperandInfo(const Value *V) {
 
   // Check for a splat of a constant or for a non uniform vector of constants
   // and check if the constant(s) are all powers of two.
-  if (isa<ConstantVector>(V) || isa<ConstantDataVector>(V)) {
+  if (isa<ConstantVector>(V) || isa<ConstantDataVector>(V) ||
+      isa<ConstantExpr>(V)) {
----------------
davemgreen wrote:

Yeah this was a relatively late addition whilst writing SVE tests. #122469 has it separated out.

https://github.com/llvm/llvm-project/pull/122236


More information about the llvm-commits mailing list