llvm-6502/test/Transforms/InstCombine/pr21651.ll
David Majnemer 4a9d304d9d InstCombine: Don't assume DataLayout is always available
We tried to get the result of DataLayout::getLargestLegalIntTypeSize but
we didn't have a DataLayout.  This resulted in opt crashing.

This fixes PR21651.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222645 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24 07:26:20 +00:00

21 lines
425 B
LLVM

; RUN: opt < %s -instcombine -S | FileCheck %s
define void @PR21651() {
switch i2 0, label %out [
i2 0, label %out
i2 1, label %out
]
out:
ret void
}
; CHECK-LABEL: define void @PR21651(
; CHECK: switch i2 0, label %out [
; CHECK: i2 0, label %out
; CHECK: i2 1, label %out
; CHECK: ]
; CHECK: out: ; preds = %0, %0, %0
; CHECK: ret void
; CHECK: }