Skip to content
Commit 0bf4795d authored by Reid Kleckner's avatar Reid Kleckner Committed by Hans Wennborg
Browse files

[WinEH] Fix inttoptr+phi optimization in presence of catchswitch

getFirstInsertionPt's return value must be checked for validity before
casting it to Instruction*. Don't attempt to insert casts after a phi in
a catchswitch block.

Fixes PR45033, introduced in D37832.

Reviewed By: davidxl, hfinkel

Differential Revision: https://reviews.llvm.org/D75381

(cherry picked from commit 1adbe86d)
parent 99e5b2ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment