diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-11-08 20:34:25 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-11-08 20:34:25 +0000 |
commit | 562b1d883f304e52b237e0af2ff7e4a9e02100cd (patch) | |
tree | cf37e1853faa14e23b4dd42c6538c02c10f6f234 /test/Transforms/InstCombine/2012-07-25-LoadPart.ll | |
parent | 6b370e615ca5b3ef17ed4fe4fa891fab1e2bdd9a (diff) | |
download | llvm-562b1d883f304e52b237e0af2ff7e4a9e02100cd.tar.gz llvm-562b1d883f304e52b237e0af2ff7e4a9e02100cd.tar.bz2 llvm-562b1d883f304e52b237e0af2ff7e4a9e02100cd.tar.xz |
llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/2012-07-25-LoadPart.ll')
-rw-r--r-- | test/Transforms/InstCombine/2012-07-25-LoadPart.ll | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Transforms/InstCombine/2012-07-25-LoadPart.ll b/test/Transforms/InstCombine/2012-07-25-LoadPart.ll index 73e5a6653e..18aab7f27e 100644 --- a/test/Transforms/InstCombine/2012-07-25-LoadPart.ll +++ b/test/Transforms/InstCombine/2012-07-25-LoadPart.ll @@ -1,12 +1,14 @@ -; RUN: opt < %s -instcombine -S | FileCheck %s +; RUN: opt < %s -default-data-layout="e-p:32:32:32" -instcombine -S | FileCheck %s --check-prefix=LE +; RUN: opt < %s -default-data-layout="E-p:32:32:32" -instcombine -S | FileCheck %s --check-prefix=BE ; PR13442 -target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128" - @test = constant [4 x i32] [i32 1, i32 2, i32 3, i32 4] define i64 @foo() { %ret = load i64* bitcast (i8* getelementptr (i8* bitcast ([4 x i32]* @test to i8*), i64 2) to i64*), align 1 ret i64 %ret - ; CHECK: ret i64 844424930263040 + ; 0x00030000_00020000 in [01 00/00 00 02 00 00 00 03 00/00 00 04 00 00 00] + ; LE: ret i64 844424930263040 + ; 0x00000200_00000300 in [00 00/00 01 00 00 00 02 00 00/00 03 00 00 00 04] + ; BE: ret i64 281474976841728 } |