diff options
| author | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2019-04-17 04:52:47 +0000 |
| commit | cee313d288a4faf0355d76fb6e0e927e211d08a5 (patch) | |
| tree | d386075318d761197779a96e5d8fc0dc7b06342b /llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll | |
| parent | c3d6a929fdd92fd06d4304675ade8d7210ee711a (diff) | |
| download | bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.tar.gz bcm5719-llvm-cee313d288a4faf0355d76fb6e0e927e211d08a5.zip | |
Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.
Will be re-reverting again.
llvm-svn: 358552
Diffstat (limited to 'llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll')
| -rw-r--r-- | llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll b/llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll new file mode 100644 index 00000000000..b8d41abe1c3 --- /dev/null +++ b/llvm/test/Transforms/Inline/inline-constexpr-addrspacecast-argument.ll @@ -0,0 +1,31 @@ +; RUN: opt -S -inline < %s | FileCheck %s +; RUN: opt -S -passes='cgscc(inline)' < %s | FileCheck %s + +target datalayout = "e-p3:32:32-p4:64:64-n32" + +@lds = internal addrspace(3) global [64 x i64] zeroinitializer + +; CHECK-LABEL: @constexpr_addrspacecast_ptr_size_change( +; CHECK: load i64, i64 addrspace(4)* addrspacecast (i64 addrspace(3)* getelementptr inbounds ([64 x i64], [64 x i64] addrspace(3)* @lds, i32 0, i32 0) to i64 addrspace(4)*) +; CHECK-NEXT: br +define void @constexpr_addrspacecast_ptr_size_change() #0 { + %tmp0 = call i32 @foo(i64 addrspace(4)* addrspacecast (i64 addrspace(3)* getelementptr inbounds ([64 x i64], [64 x i64] addrspace(3)* @lds, i32 0, i32 0) to i64 addrspace(4)*)) #1 + ret void +} + +define i32 @foo(i64 addrspace(4)* %arg) #1 { +bb: + %tmp = getelementptr i64, i64 addrspace(4)* %arg, i64 undef + %tmp1 = load i64, i64 addrspace(4)* %tmp + br i1 undef, label %bb2, label %bb3 + +bb2: + store i64 0, i64 addrspace(4)* %tmp + br label %bb3 + +bb3: + unreachable +} + +attributes #0 = { nounwind } +attributes #1 = { alwaysinline nounwind } |

