mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
Summary: DataLayout keeps the string used for its creation. As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no longer canonicalized, you can't rely on two "equals" DataLayout having the same string returned by getStringRepresentation(). Get rid of DataLayoutPass: the DataLayout is in the Module The DataLayout is "per-module", let's enforce this by not duplicating it more than necessary. One more step toward non-optionality of the DataLayout in the module. Make DataLayout Non-Optional in the Module Module->getDataLayout() will never returns nullptr anymore. Reviewers: echristo Subscribers: resistor, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D7992 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231270 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
492 B
LLVM
25 lines
492 B
LLVM
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
; Provide legal integer types.
|
|
target datalayout = "n8:16:32:64"
|
|
|
|
|
|
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: }
|