[llvm] [AArch64] Model shifts folded into scalar logical instructions (PR #229109)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 02:49:01 PDT 2026


================
@@ -5268,6 +5307,10 @@ InstructionCost AArch64TTIImpl::getArithmeticInstrCost(
   case ISD::SRL:
   case ISD::SRA:
   case ISD::SHL: {
+
+    if (canFoldShiftIntoUser(Opcode, Ty, CtxI))
+      return TTI::TCC_Free;
----------------
davemgreen wrote:

I prefer to just use 0

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


More information about the llvm-commits mailing list