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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 13:14:59 PST 2020


rnk created this revision.
rnk added reviewers: davidxl, wmi, hfinkel.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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 <https://reviews.llvm.org/D37832>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75381

Files:
  llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
  llvm/test/Transforms/InstCombine/intptr8.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75381.247357.patch
Type: text/x-patch
Size: 5510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200228/ed316b58/attachment.bin>


More information about the llvm-commits mailing list