)]}'
{
  "commit": "f575b18fdc8359bddc8747dbb8b16e5d10705dda",
  "tree": "76ec7a8d04d3a29b6565921e812c09841532ec5e",
  "parents": [
    "dea4f3213d84507ca9741faccab789f48c44e00d"
  ],
  "author": {
    "name": "David Sherwood",
    "email": "david.sherwood@arm.com",
    "time": "Wed Jul 02 13:05:51 2025 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 02 13:05:51 2025 +0100"
  },
  "message": "[LV] Add support for partial reductions without a binary op (#133922)\n\nConsider IR such as this:\n\nfor.body:\n  %iv \u003d phi i64 [ 0, %entry ], [ %iv.next, %for.body ]\n  %accum \u003d phi i32 [ 0, %entry ], [ %add, %for.body ]\n  %gep.a \u003d getelementptr i8, ptr %a, i64 %iv\n  %load.a \u003d load i8, ptr %gep.a, align 1\n  %ext.a \u003d zext i8 %load.a to i32\n  %add \u003d add i32 %ext.a, %accum\n  %iv.next \u003d add i64 %iv, 1\n  %exitcond.not \u003d icmp eq i64 %iv.next, 1025\n  br i1 %exitcond.not, label %for.exit, label %for.body\n\nConceptually we can vectorise this using partial reductions too,\nalthough the current loop vectoriser implementation requires the\naccumulation of a multiply. For AArch64 this is easily done with\na udot or sdot with an identity operand, i.e. a vector of (i16 1).\n\nIn order to do this I had to teach getScaledReductions that the\naccumulated value may come from a unary op, hence there is only\none extension to consider. Similarly, I updated the vplan and\nAArch64 TTI cost model to understand the possible unary op.\n\n---------\n\nCo-authored-by: Matt Devereau \u003cmatthew.devereau@arm.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "90d92e0fcf55c3546c054e6d9b4dc3c8f27d8095",
      "old_mode": 33188,
      "old_path": "llvm/include/llvm/Analysis/TargetTransformInfo.h",
      "new_id": "c43870392361db3caf80ea1761801e118d85a783",
      "new_mode": 33188,
      "new_path": "llvm/include/llvm/Analysis/TargetTransformInfo.h"
    },
    {
      "type": "modify",
      "old_id": "66252f737ddb978d75bca8967d6f152d9b2b8c59",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp",
      "new_id": "380faa6cf693992a748f77c3b928c53e4ec5a3bf",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp"
    },
    {
      "type": "modify",
      "old_id": "1afaaf7dd1cccc49ffa85bb9e954178386aa70e3",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/Vectorize/LoopVectorize.cpp",
      "new_id": "907839711a39ca9958b6f7da504884e26cde7bef",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/Vectorize/LoopVectorize.cpp"
    },
    {
      "type": "modify",
      "old_id": "8369c78a2d78f594a5918fea0891d1e714a1fa8d",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h",
      "new_id": "41878e3c648e30dc5cbc5d437c1c4331822f0730",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h"
    },
    {
      "type": "modify",
      "old_id": "24f2d6a83c5e4e5f89f4e61e6cf11bbecabddb53",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp",
      "new_id": "318e8171e098d74ef2a8e87c9b760ba583022edf",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp"
    },
    {
      "type": "modify",
      "old_id": "0db4dc07fbfe2f26e08eba50bde99e2ef2d55b4d",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AArch64/neon-partial-reduce-dot-product.ll",
      "new_id": "2d81a264e02bcfdfc3a03ec63470d243c44ce20f",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AArch64/neon-partial-reduce-dot-product.ll"
    },
    {
      "type": "modify",
      "old_id": "295fe1b891e04cfb74af582bd903ed03a5fae12a",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-chained.ll",
      "new_id": "b02b314ecbd670e600ab1473f3ed16e277279d43",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-chained.ll"
    },
    {
      "type": "modify",
      "old_id": "d2a82269e1b8f6b471ea409575cbfd16775e05d1",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-mixed.ll",
      "new_id": "1d3741482212a64aa8a444a96d930616268eb533",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-mixed.ll"
    },
    {
      "type": "modify",
      "old_id": "a44b9bfb3b4468f40eb5e924dad89300aa9fd7dd",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll",
      "new_id": "887f95ce31f4756f2caaa4dcbc5ec18661cb0aed",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5d5ee570da0ffc53fca064b92cdf6f202fc56117",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce.ll"
    }
  ]
}
