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/overflow-mul.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/overflow-mul.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/overflow-mul.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/overflow-mul.ll b/llvm/test/Transforms/InstCombine/overflow-mul.ll index 6d8d40bcac3..bc0504b0a96 100644 --- a/llvm/test/Transforms/InstCombine/overflow-mul.ll +++ b/llvm/test/Transforms/InstCombine/overflow-mul.ll @@ -174,6 +174,17 @@ define <4 x i32> @pr20113(<4 x i16> %a, <4 x i16> %b) { ret <4 x i32> %vcgez.i } + +; The last test needs this weird datalayout. +target datalayout = "i32:8:8" +; Without it, InstCombine will align the pointed on 4 Bytes +; The KnownBitsZero that result from the alignment allows to +; turn: +; and i32 %mul, 255 +; to: +; and i32 %mul, 252 +; The mask is no longer in the form 2^n-1 and this prevents the transformation. + @pr21445_data = external global i32 define i1 @pr21445(i8 %a) { ; CHECK-LABEL: @pr21445( |