)]}'
{
  "commit": "66e7569e15a627eb4ed1849c9a4fe8bb435c3b15",
  "tree": "dd1708c2bcb3c03322c185b0bb49e888acb9493a",
  "parents": [
    "a9d6c34d868affa55c403ce82428882b825441a2"
  ],
  "author": {
    "name": "David Neto",
    "email": "dneto@google.com",
    "time": "Mon Dec 20 16:46:55 2021 +0000"
  },
  "committer": {
    "name": "Tint LUCI CQ",
    "email": "tint-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Dec 20 16:46:55 2021 +0000"
  },
  "message": "spirv-writer: Fix termination of basic blocks\n\nThere are a few places where a branch or return is created,\nconditionally on whether a terminator was the last thing seen.\nThe goal is to generate a SPIR-V basic block terminator exactly\nwhen needed, and to avoid generating a branch or return immediately\nafter a prior terminator.\n\nPreviously, the decision was based on the last thing seen in the AST.\nBut we should instead check the emitted SPIR-V instead.\n\nThis fixes cases such as a break or return inside an else-if.\nThat\u0027s because an if/elseif is actually a selection inside a selection.\nLooking at the AST only works when trying to terminate the *inside*\nselection.  In the outer recursive call, the last AST node is\nno longer a terminator, and we would skip generating the branch\nto the merge block.\n\nFixed: tint:1315\nChange-Id: I6b886ce85d1d681f2063997e469e0c1b4e5973a2\nReviewed-on: https://dawn-review.googlesource.com/c/tint/+/73480\nKokoro: Kokoro \u003cnoreply+kokoro@google.com\u003e\nAuto-Submit: David Neto \u003cdneto@google.com\u003e\nReviewed-by: James Price \u003cjrprice@google.com\u003e\nCommit-Queue: James Price \u003cjrprice@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "04334a20c13929ed752164900a66ec08fe89f2fd",
      "old_mode": 33188,
      "old_path": "src/writer/spirv/builder.cc",
      "new_id": "1f6246ef64b5683f238827813d90621066d0a063",
      "new_mode": 33188,
      "new_path": "src/writer/spirv/builder.cc"
    },
    {
      "type": "modify",
      "old_id": "d2b523710059fdbad4f29dd57bf943d0e366bafb",
      "old_mode": 33188,
      "old_path": "src/writer/spirv/builder.h",
      "new_id": "fdfc3b30e9ce7d7f52ffc05dd319b7c220d2994d",
      "new_mode": 33188,
      "new_path": "src/writer/spirv/builder.h"
    },
    {
      "type": "modify",
      "old_id": "6273bee90c670283be944556e719fd7777d59d41",
      "old_mode": 33188,
      "old_path": "src/writer/spirv/builder_if_test.cc",
      "new_id": "2fda0e1d62ba46f80789f9d0d61cb19808cd370e",
      "new_mode": 33188,
      "new_path": "src/writer/spirv/builder_if_test.cc"
    },
    {
      "type": "modify",
      "old_id": "926f33f312499a64ee9a08999f4f32c7f4680489",
      "old_mode": 33188,
      "old_path": "src/writer/spirv/function.h",
      "new_id": "df747ec5abcc3a5bd482fb0036c3acc376630e8d",
      "new_mode": 33188,
      "new_path": "src/writer/spirv/function.h"
    }
  ]
}
