diff options
author | Owen Anderson <resistor@mac.com> | 2015-03-10 06:51:39 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2015-03-10 06:51:39 +0000 |
commit | 58364dc4dac58fbf0a3bb7cbf54d9bc9dfed550c (patch) | |
tree | 0c50a71ffc75b1339b101bdd7a1aa0a52fed39f5 /llvm/test/Transforms/InstCombine/switch-truncate-crash.ll | |
parent | e90f992b219850f06ea6c236e73de4c6725a3dd7 (diff) | |
download | bcm5719-llvm-58364dc4dac58fbf0a3bb7cbf54d9bc9dfed550c.tar.gz bcm5719-llvm-58364dc4dac58fbf0a3bb7cbf54d9bc9dfed550c.zip |
Fix a crash in InstCombine where we could try to truncate a switch comparison to zero width.
llvm-svn: 231761
Diffstat (limited to 'llvm/test/Transforms/InstCombine/switch-truncate-crash.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/switch-truncate-crash.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/switch-truncate-crash.ll b/llvm/test/Transforms/InstCombine/switch-truncate-crash.ll new file mode 100644 index 00000000000..cc3c1ff28ed --- /dev/null +++ b/llvm/test/Transforms/InstCombine/switch-truncate-crash.ll @@ -0,0 +1,7 @@ +; RUN: opt -instcombine < %s + +define void @test() { + switch i32 0, label %out [i32 0, label %out] +out: + ret void +} |