)]}'
{
  "commit": "bcbc20bf6ec83f24cd23dd6b03b0e50e54080369",
  "tree": "a3915f5df6f55a72593ae0ac39a4b461ba719411",
  "parents": [
    "7a4f33b1f5b1bf79bb86ff59476eec5146766aa7"
  ],
  "author": {
    "name": "Kenneth Graunke",
    "email": "kenneth@whitecape.org",
    "time": "Mon Nov 30 16:14:55 2020 -0800"
  },
  "committer": {
    "name": "Dylan Baker",
    "email": "dylan.c.baker@intel.com",
    "time": "Tue Dec 01 10:06:17 2020 -0800"
  },
  "message": "nir/algebraic: Avoid creating new fp64 ops when using softfp64\n\nIn commit 00b28a50b2c492eee25ef3f75538aabe1e569ff1, Marek extended\na number of optimizations that had been 32-bit specific to work on\nother bit-sizes.\n\nMost optimizations preserve the data type across the transformation.\nIn other words, an optimization which generates e.g. fp64 operations\nonly does so when the source expression also contains fp64 operations.\nThese transformations are fine with respect to lowering, because we\nwill lower away all expressions that would trigger the search portion\nof the expression, and so we\u0027d never apply those rules.\n\nHowever, a few of the rules create new operations that run afoul of\nlowering passes.  For example,\n\n    (\u0027bcsel\u0027, a, 1.0, 0.0) \u003d\u003e (\u0027b2f\u0027, a)\n\nwhere the result is a double would simply be a selection between two\ndifferent 64-bit constants.  The replacement expression, on the other\nhand, involves a nir_op_b2f64 ALU operation.  If we\u0027re run after\nnir_lower_doubles, then it may not be legal to generate such an\nexpression anymore (at least without running lowering again, which we\ndon\u0027t do today).\n\nRegressions due to this are blocking the 20.3 release, so for now, we\ntake the easy route and simply disallow those few rules when doing full\nsoftfp64 lowering, which fixes the immediate problem.  But it doesn\u0027t\nsolve the long-term problem in an extensible manner.\n\nIn the future, we may want to add a `lowered_alu_ops` bitfield to the\nNIR shader, and as lowering passes are run, mark them as taboo.  Then,\nwe could have each algebraic transformation track which operations it\ncreates in the replacement expression.  With both of those in place,\nnir_replace_instr could compare the transformation\u0027s list of ALU ops\nagainst `lowered_alu_ops` and implicitly skip rules that generate\nforbidden ALU operations.\n\nCloses: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3504\nReviewed-by: Ian Romanick \u003cian.d.romanick@intel.com\u003e\nPart-of: \u003chttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7841\u003e\n(cherry picked from commit 531843cf2e939b764822ef56ba8e034ad417a812)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cacb3ccf126c4e9a52bc8429786edf82fd4f9099",
      "old_mode": 33188,
      "old_path": ".pick_status.json",
      "new_id": "5eefdd0d1195c86c2817faff1734ec04b41ac289",
      "new_mode": 33188,
      "new_path": ".pick_status.json"
    },
    {
      "type": "modify",
      "old_id": "3112623d9ff049a4deee25489e3990b86e27e4fa",
      "old_mode": 33188,
      "old_path": "src/compiler/nir/nir_opt_algebraic.py",
      "new_id": "2fb4d5ae629f237d6bbbcc1aad40c7275f366881",
      "new_mode": 33188,
      "new_path": "src/compiler/nir/nir_opt_algebraic.py"
    }
  ]
}
