diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
| commit | 46a43556db23edb514f190cc03b0ce7f68d40534 (patch) | |
| tree | 8975390ebdcdf12760bb63b35a7eb883156e87fd /llvm/test/Transforms/InstCombine/simplify-libcalls.ll | |
| parent | 2ae03e178392e0693872e42c947d784b3c02ea60 (diff) | |
| download | bcm5719-llvm-46a43556db23edb514f190cc03b0ce7f68d40534.tar.gz bcm5719-llvm-46a43556db23edb514f190cc03b0ce7f68d40534.zip | |
Make DataLayout Non-Optional in the Module
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>
llvm-svn: 231270
Diffstat (limited to 'llvm/test/Transforms/InstCombine/simplify-libcalls.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/simplify-libcalls.ll | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/test/Transforms/InstCombine/simplify-libcalls.ll b/llvm/test/Transforms/InstCombine/simplify-libcalls.ll index 6eb474449c9..e264c2c7240 100644 --- a/llvm/test/Transforms/InstCombine/simplify-libcalls.ll +++ b/llvm/test/Transforms/InstCombine/simplify-libcalls.ll @@ -1,4 +1,5 @@ ; RUN: opt -S < %s -instcombine | FileCheck %s +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" @G = constant [3 x i8] c"%s\00" ; <[3 x i8]*> [#uses=1] @@ -19,7 +20,7 @@ define i8* @test1() { ret i8* %tmp3 ; CHECK-LABEL: @test1( -; CHECK: ret i8* getelementptr inbounds ([5 x i8]* @str, i32 0, i64 3) +; CHECK: ret i8* getelementptr inbounds ([5 x i8]* @str, i32 0, i32 3) } declare i8* @strchr(i8*, i32) @@ -29,7 +30,7 @@ define i8* @test2() { ret i8* %tmp3 ; CHECK-LABEL: @test2( -; CHECK: ret i8* getelementptr inbounds ([8 x i8]* @str1, i32 0, i64 7) +; CHECK: ret i8* getelementptr inbounds ([8 x i8]* @str1, i32 0, i32 7) } define i8* @test3() { |

