[llvm] 37a7c0a - [Test] Add failing test for pr47457
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 01:45:51 PDT 2020
Author: Max Kazantsev
Date: 2020-09-09T15:45:35+07:00
New Revision: 37a7c0a00773f135d909eb9eba7f82547aee1e89
URL: https://github.com/llvm/llvm-project/commit/37a7c0a00773f135d909eb9eba7f82547aee1e89
DIFF: https://github.com/llvm/llvm-project/commit/37a7c0a00773f135d909eb9eba7f82547aee1e89.diff
LOG: [Test] Add failing test for pr47457
Added:
llvm/test/Transforms/LoopLoadElim/pr47457.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopLoadElim/pr47457.ll b/llvm/test/Transforms/LoopLoadElim/pr47457.ll
new file mode 100644
index 000000000000..1b102944cd76
--- /dev/null
+++ b/llvm/test/Transforms/LoopLoadElim/pr47457.ll
@@ -0,0 +1,45 @@
+; RUN: opt -loop-load-elim -S %s | FileCheck %s
+; RUN: opt -passes=loop-load-elim -S %s | FileCheck %s
+; REQUIRES: asserts
+; XFAIL: *
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @test() {
+; CHECK-LABEL: test
+
+bb:
+ br label %bb1
+
+bb1: ; preds = %bb6, %bb1, %bb
+ %tmp = phi i32 [ undef, %bb ], [ 0, %bb1 ], [ %tmp3, %bb6 ]
+ br i1 undef, label %bb1, label %bb2
+
+bb2: ; preds = %bb1
+ %tmp3 = add i32 %tmp, 1
+ %tmp4 = icmp ult i32 %tmp, undef
+ br i1 %tmp4, label %bb6, label %bb5
+
+bb5: ; preds = %bb2
+ ret void
+
+bb6: ; preds = %bb2
+ br i1 undef, label %bb7, label %bb1
+
+bb7: ; preds = %bb7, %bb6
+ %tmp8 = phi i32 [ %tmp15, %bb7 ], [ %tmp3, %bb6 ]
+ %tmp9 = phi i32 [ %tmp8, %bb7 ], [ %tmp, %bb6 ]
+ %tmp10 = zext i32 %tmp9 to i64
+ %tmp11 = getelementptr inbounds float, float addrspace(1)* null, i64 %tmp10
+ %tmp12 = load float, float addrspace(1)* %tmp11, align 4
+ %tmp13 = zext i32 %tmp8 to i64
+ %tmp14 = getelementptr inbounds float, float addrspace(1)* null, i64 %tmp13
+ store float 1.000000e+00, float addrspace(1)* %tmp14, align 4
+ %tmp15 = add nuw nsw i32 %tmp8, 1
+ %tmp16 = icmp sgt i32 %tmp8, 78
+ br i1 %tmp16, label %bb17, label %bb7
+
+bb17: ; preds = %bb7
+ unreachable
+}
More information about the llvm-commits
mailing list