intel / intel-graphics-compiler

Other
597 stars 155 forks source link

Fix broken BasicBlock in Emu64OpsPass #199

Closed troels closed 3 years ago

troels commented 3 years ago

InstExpander::convertUIToFP32 did not set its insertion point correctly and were thus adding instructions to a non-existing BasicBlock.

Fix by ensuring that the insertion point is set to the right instruction in the new block and allow the callers to continue from where convertUIToFP32 left off.

This fixes #192 as that bug was due to an infinite loop caused by a corrupt block, (where half of the instructions had some other parent block) attempting to sink an instruction to the same block again and again.

pszymich commented 3 years ago

Hi @troels,

Your change has been merged and you can see it here: e785722a1ab5d675d7ad62a9ce606f8b0f764a99

Thank you for your contribution!