[PATCH] D105309: [InstCombine] Don't combine PHI before catchswitch

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 2 11:43:08 PDT 2021


rnk accepted this revision.
rnk added a comment.

lgtm



================
Comment at: llvm/test/Transforms/InstCombine/catchswitch-phi.ll:1
+target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128-ni:1"
+target triple = "wasm32-unknown-unknown"
----------------
aheejin wrote:
> rnk wrote:
> > lebedev.ri wrote:
> > > This isn't testing anything
> > That's true, and I don't see any cast instructions to trigger the codepath we are looking at.
> Oh sorry, I forgot to add the `RUN` line. Added now. Basically this shouldn't crash.
> @rnk `phi` in `bb4` is the one that triggers the crash (without this patch).
I think I was looking for bitcast instructions, but the zero-index GEPs are essentially cast instructions here. Looks good.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105309/new/

https://reviews.llvm.org/D105309



More information about the llvm-commits mailing list