)]}'
{
  "commit": "ace8e1e3d44399de3933b068726eb90b11578ccf",
  "tree": "15e9a0bb4aed8533a656eee10c013156c95d4ad0",
  "parents": [
    "f67672e41c8972f7a0e9f503e0cf58b21af24788"
  ],
  "author": {
    "name": "Andrea Di Biagio",
    "email": "Andrea_DiBiagio@sn.scee.net",
    "time": "Wed Aug 13 16:09:40 2014 +0000"
  },
  "committer": {
    "name": "Andrea Di Biagio",
    "email": "Andrea_DiBiagio@sn.scee.net",
    "time": "Wed Aug 13 16:09:40 2014 +0000"
  },
  "message": "[DAGCombiner] Improved target independent vector shuffle combine rule.\n\nThis patch improves the existing algorithm in DAGCombiner that\nattempts to fold shuffles according to rule:\n  shuffle(shuffle(x, y, M1), undef, M2) -\u003e shuffle(y, undef, M3)\n\nBefore this change, there were cases where the DAGCombiner conservatively\navoided folding shuffles even if the resulting mask would have been legal.\nThat is because the algorithm wrongly assumed that commuting\nan illegal shuffle mask would always produce an illegal mask.\n\nWith this change, we now correctly compute the commuted shuffle mask before\ncalling method \u0027isShuffleMaskLegal\u0027 on it.\nOn X86, this improves for example the codegen for the following function:\n\ndefine \u003c4 x i32\u003e @test(\u003c4 x i32\u003e %A, \u003c4 x i32\u003e %B) {\n  %1 \u003d shufflevector \u003c4 x i32\u003e %B, \u003c4 x i32\u003e %A, \u003c4 x i32\u003e \u003ci32 1, i32 2, i32 6, i32 7\u003e\n  %2 \u003d shufflevector \u003c4 x i32\u003e %1, \u003c4 x i32\u003e undef, \u003c4 x i32\u003e \u003ci32 2, i32 3, i32 2, i32 3\u003e\n  ret \u003c4 x i32\u003e %2\n}\n\nBefore this change the X86 backend (-mcpu\u003dcorei7) generated\nthe following assembly code for function @test:\n  shufps $-23, %xmm0, %xmm1  # xmm1 \u003d xmm1[1,2],xmm0[2,3]\n  movhlps %xmm1, %xmm1       # xmm1 \u003d xmm1[1,1]\n  movaps %xmm1, %xmm0\n\nNow we produce:\n  movhlps %xmm0, %xmm0       # xmm0 \u003d xmm0[1,1]\n\nAdded extra test cases in combine-vec-shuffle-2.ll to verify that we correctly\nfold according to the above-mentioned rule.\n\nllvm-svn: 215555\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e8cbd8af7a83d9b2580250e66cde4349a42bb641",
      "old_mode": 33188,
      "old_path": "llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp",
      "new_id": "603ccb090ed94d00bee05ef5371a8a03ed77a12a",
      "new_mode": 33188,
      "new_path": "llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp"
    },
    {
      "type": "modify",
      "old_id": "877d38260d6133cbc5368e58d6882bdb07f70c57",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/X86/combine-vec-shuffle-2.ll",
      "new_id": "872384ca0a185c75a1c0c30559c7ff1ab5e4e94d",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/X86/combine-vec-shuffle-2.ll"
    }
  ]
}
