[reg2mem] Skip non-sized Instructions (PR58890)
authorHanSheng Zhang <admin@mayuyu.io>
Mon, 14 Nov 2022 11:45:23 +0000 (12:45 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 14 Nov 2022 11:47:39 +0000 (12:47 +0100)
commit200f3410cd0136460a776001712239129df7dd35
treeafaee6b036849b7a0124ac1f43c16abe5e1147e1
parente28cc9382e6a41ddd641e0ca9e9176629c0d8187
[reg2mem] Skip non-sized Instructions (PR58890)

We can only convert sized values into alloca/load/store, skip
instructions returning other types.

Fixes https://github.com/llvm/llvm-project/issues/58890.

Differential Revision: https://reviews.llvm.org/D137700
llvm/lib/Transforms/Scalar/Reg2Mem.cpp
llvm/test/Transforms/Reg2Mem/catchswitch-crash.ll [new file with mode: 0644]
llvm/test/Transforms/Reg2Mem/non-token-test.ll [new file with mode: 0644]