[llvm] 04a0896 - Revert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops"
Atmn Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 21:32:28 PST 2020
Author: Atmn Patel
Date: 2020-11-07T00:32:12-05:00
New Revision: 04a08964879f77b4b55105f54223e5d142d9e3b5
URL: https://github.com/llvm/llvm-project/commit/04a08964879f77b4b55105f54223e5d142d9e3b5
DIFF: https://github.com/llvm/llvm-project/commit/04a08964879f77b4b55105f54223e5d142d9e3b5.diff
LOG: Revert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops"
This reverts commit 0b17c6e4479d62bd4ff05c48d6cdf340b198832f. This patch
causes a compile-time error in SCEV.
Added:
Modified:
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Other/loop-deletion-printer.ll
llvm/test/Other/loop-pm-invalidation.ll
llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll
llvm/test/Transforms/LoopDeletion/basic-remark.ll
llvm/test/Transforms/LoopDeletion/diundef.ll
llvm/test/Transforms/LoopDeletion/invalidation.ll
llvm/test/Transforms/LoopDeletion/multiple-exit-conditions.ll
llvm/test/Transforms/LoopDeletion/multiple-exits.ll
llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
llvm/test/Transforms/LoopDeletion/unreachable-loops.ll
llvm/test/Transforms/LoopDeletion/use-in-unreachable.ll
llvm/test/Transforms/SCCP/calltest.ll
llvm/test/Transforms/SimpleLoopUnswitch/pr37888.ll
Removed:
llvm/test/Transforms/LoopDeletion/mustprogress.ll
################################################################################
diff --git a/llvm/include/llvm/Transforms/Utils/LoopUtils.h b/llvm/include/llvm/Transforms/Utils/LoopUtils.h
index 076ea2f4453b..d741b5142e5b 100644
--- a/llvm/include/llvm/Transforms/Utils/LoopUtils.h
+++ b/llvm/include/llvm/Transforms/Utils/LoopUtils.h
@@ -229,9 +229,6 @@ bool hasDisableAllTransformsHint(const Loop *L);
/// Look for the loop attribute that disables the LICM transformation heuristics.
bool hasDisableLICMTransformsHint(const Loop *L);
-/// Look for the loop attribute that requires progress within the loop.
-bool hasMustProgress(const Loop *L);
-
/// The mode sets how eager a transformation should be applied.
enum TransformationMode {
/// The pass can use heuristics to determine whether a transformation should
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index 0db50d06ff26..065db647561e 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -210,10 +210,8 @@ static LoopDeletionResult deleteLoopIfDead(Loop *L, DominatorTree &DT,
// Don't remove loops for which we can't solve the trip count.
// They could be infinite, in which case we'd be changing program behavior.
const SCEV *S = SE.getConstantMaxBackedgeTakenCount(L);
- if (isa<SCEVCouldNotCompute>(S) &&
- !L->getHeader()->getParent()->mustProgress() && !hasMustProgress(L)) {
- LLVM_DEBUG(dbgs() << "Could not compute SCEV MaxBackedgeTakenCount and was "
- "not required to make progress.\n");
+ if (isa<SCEVCouldNotCompute>(S)) {
+ LLVM_DEBUG(dbgs() << "Could not compute SCEV MaxBackedgeTakenCount.\n");
return Changed ? LoopDeletionResult::Modified
: LoopDeletionResult::Unmodified;
}
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 4210cd66f3f6..e10a2306547a 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -63,7 +63,6 @@ static cl::opt<bool> ForceReductionIntrinsic(
static const char *LLVMLoopDisableNonforced = "llvm.loop.disable_nonforced";
static const char *LLVMLoopDisableLICM = "llvm.licm.disable";
-static const char *LLVMLoopMustProgress = "llvm.loop.mustprogress";
bool llvm::formDedicatedExitBlocks(Loop *L, DominatorTree *DT, LoopInfo *LI,
MemorySSAUpdater *MSSAU,
@@ -405,10 +404,6 @@ bool llvm::hasDisableLICMTransformsHint(const Loop *L) {
return getBooleanLoopAttribute(L, LLVMLoopDisableLICM);
}
-bool llvm::hasMustProgress(const Loop *L) {
- return getBooleanLoopAttribute(L, LLVMLoopMustProgress);
-}
-
TransformationMode llvm::hasUnrollTransformation(Loop *L) {
if (getBooleanLoopAttribute(L, "llvm.loop.unroll.disable"))
return TM_SuppressedByUser;
diff --git a/llvm/test/Other/loop-deletion-printer.ll b/llvm/test/Other/loop-deletion-printer.ll
index 997905141982..6cb29ae374fb 100644
--- a/llvm/test/Other/loop-deletion-printer.ll
+++ b/llvm/test/Other/loop-deletion-printer.ll
@@ -14,7 +14,7 @@
; DELETED-BUT-PRINTED: IR Dump {{.*}}LoopDeletionPass {{.*invalidated:}}
; DELETED-BUT-PRINTED-NOT: IR Dump {{.*}}LoopInstSimplifyPass
-define void @deleteme() willreturn {
+define void @deleteme() {
entry:
br label %loop
loop:
diff --git a/llvm/test/Other/loop-pm-invalidation.ll b/llvm/test/Other/loop-pm-invalidation.ll
index e6bd888ed32b..9deb17f124d6 100644
--- a/llvm/test/Other/loop-pm-invalidation.ll
+++ b/llvm/test/Other/loop-pm-invalidation.ll
@@ -227,7 +227,7 @@ exit:
ret void
}
-define void @dead_loop() willreturn {
+define void @dead_loop() {
; CHECK-LOOP-INV: Starting {{.*}}Function pass manager run
; CHECK-LOOP-INV-NEXT: Starting {{.*}}Function pass manager run
; CHECK-LOOP-INV-NEXT: Running pass: LoopSimplifyPass
diff --git a/llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll b/llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
index 8ff32219d423..b54d520a91f7 100644
--- a/llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
+++ b/llvm/test/Transforms/LICM/2003-02-27-PreheaderProblem.ll
@@ -6,7 +6,7 @@
; RUN: opt < %s -licm -loop-deletion -simplifycfg -S | \
; RUN: not grep "br "
-define i32 @main(i32 %argc) willreturn {
+define i32 @main(i32 %argc) {
; <label>:0
br label %bb5
bb5: ; preds = %bb5, %0
diff --git a/llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll b/llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll
index ca1b2ece6294..ad8b8b4c6c48 100644
--- a/llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll
+++ b/llvm/test/Transforms/LoopDeletion/2017-07-11-incremental-dt.ll
@@ -15,7 +15,7 @@
; DT: [3] %for.body
; DT: [4] %for.cond3.loopexit
-define i32 @fn1() willreturn {
+define i32 @fn1() {
entry:
br label %for.cond
diff --git a/llvm/test/Transforms/LoopDeletion/basic-remark.ll b/llvm/test/Transforms/LoopDeletion/basic-remark.ll
index 757bb78aa093..c56ae9dcb03e 100644
--- a/llvm/test/Transforms/LoopDeletion/basic-remark.ll
+++ b/llvm/test/Transforms/LoopDeletion/basic-remark.ll
@@ -10,7 +10,7 @@
; CHECK-NEXT: Args:
; CHECK-NEXT: - String: Loop deleted because it is invariant
; CHECK-NEXT: ...
-define i32 @main() local_unnamed_addr willreturn {
+define i32 @main() local_unnamed_addr #0 {
entry:
br label %for.cond, !dbg !9
diff --git a/llvm/test/Transforms/LoopDeletion/diundef.ll b/llvm/test/Transforms/LoopDeletion/diundef.ll
index 1245ed5b249f..11dc05cb94d2 100644
--- a/llvm/test/Transforms/LoopDeletion/diundef.ll
+++ b/llvm/test/Transforms/LoopDeletion/diundef.ll
@@ -5,7 +5,7 @@ target triple = "x86_64-apple-macosx10.14.0"
@a = common local_unnamed_addr global i32 0, align 4, !dbg !0
-define i32 @b() local_unnamed_addr willreturn !dbg !12 {
+define i32 @b() local_unnamed_addr !dbg !12 {
entry:
call void @llvm.dbg.value(metadata i32 0, metadata !16, metadata !DIExpression()), !dbg !17
br label %for.cond, !dbg !18
diff --git a/llvm/test/Transforms/LoopDeletion/invalidation.ll b/llvm/test/Transforms/LoopDeletion/invalidation.ll
index d010f03d706a..3f7352672c56 100644
--- a/llvm/test/Transforms/LoopDeletion/invalidation.ll
+++ b/llvm/test/Transforms/LoopDeletion/invalidation.ll
@@ -8,7 +8,7 @@
; RUN: | FileCheck %s --check-prefixes=CHECK,AFTER
-define void @foo(i64 %n, i64 %m) nounwind willreturn {
+define void @foo(i64 %n, i64 %m) nounwind {
; CHECK-LABEL: @foo(
entry:
diff --git a/llvm/test/Transforms/LoopDeletion/multiple-exit-conditions.ll b/llvm/test/Transforms/LoopDeletion/multiple-exit-conditions.ll
index 7231e924ebd0..e7b47211d570 100644
--- a/llvm/test/Transforms/LoopDeletion/multiple-exit-conditions.ll
+++ b/llvm/test/Transforms/LoopDeletion/multiple-exit-conditions.ll
@@ -11,7 +11,7 @@
; CHECK: return:
; CHECK-NEXT: ret void
-define void @foo(i64 %n, i64 %m) nounwind willreturn {
+define void @foo(i64 %n, i64 %m) nounwind {
entry:
br label %bb
diff --git a/llvm/test/Transforms/LoopDeletion/multiple-exits.ll b/llvm/test/Transforms/LoopDeletion/multiple-exits.ll
index d418b64d37e5..760c3aae4ee7 100644
--- a/llvm/test/Transforms/LoopDeletion/multiple-exits.ll
+++ b/llvm/test/Transforms/LoopDeletion/multiple-exits.ll
@@ -10,7 +10,7 @@
; RUN: opt < %s -passes=loop-deletion -S | FileCheck %s --check-prefixes=CHECK,AFTER
-define void @foo(i64 %n, i64 %m) #0 {
+define void @foo(i64 %n, i64 %m) nounwind {
; CHECK-LABEL: @foo(
entry:
@@ -43,7 +43,7 @@ return:
; CHECK-NEXT: ret void
}
-define i64 @bar(i64 %n, i64 %m, i64 %maybe_zero) #0 {
+define i64 @bar(i64 %n, i64 %m, i64 %maybe_zero) nounwind {
; CHECK-LABEL: @bar(
entry:
@@ -95,7 +95,7 @@ return:
; This function has a loop which looks like @bar's but that cannot be deleted
; because which path we exit through determines which value is selected.
-define i64 @baz(i64 %n, i64 %m, i64 %maybe_zero) #0 {
+define i64 @baz(i64 %n, i64 %m, i64 %maybe_zero) nounwind {
; CHECK-LABEL: @baz(
entry:
@@ -136,5 +136,3 @@ return:
; CHECK-NEXT: %[[X:.*]] = phi i64 [ 12, %bb ], [ 10, %bb2 ], [ 10, %bb3 ]
; CHECK-NEXT: ret i64 %[[X]]
}
-
-attributes #0 = { nounwind willreturn }
\ No newline at end of file
diff --git a/llvm/test/Transforms/LoopDeletion/mustprogress.ll b/llvm/test/Transforms/LoopDeletion/mustprogress.ll
deleted file mode 100644
index d94fdb401186..000000000000
--- a/llvm/test/Transforms/LoopDeletion/mustprogress.ll
+++ /dev/null
@@ -1,237 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
-; RUN: opt < %s -loop-deletion -S | FileCheck %s
-
-;; Original C Code:
-;; void unknown_tripcount_mustprogress_attr_mustprogress_loopmd(int a, int b) {
-;; for (; a < b;) ;
-;; for (;;) ;
-;; }
-
-define void @unknown_tripcount_mustprogress_attr_mustprogress_loopmd(i32 %a, i32 %b) #0 {
-; CHECK: Function Attrs: mustprogress
-; CHECK-LABEL: define {{[^@]+}}@unknown_tripcount_mustprogress_attr_mustprogress_loopmd
-; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) [[ATTR0:#.*]] {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: unreachable
-;
-entry:
- br label %for.cond
-for.cond:
- %cmp = icmp slt i32 %a, %b
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.cond, !llvm.loop !2
-for.end:
- br label %for.cond1
-for.cond1:
- br label %for.cond1
-}
-
-;; Original C Code:
-;; void unknown_tripcount_mustprogress_attr_no_mustprogress_loopmd(int a, int b) {
-;; for (; a < b;) ;
-;; for (;;) ;
-;; }
-;; => Removed mustprogress loop attribute
-
-define void @unknown_tripcount_mustprogress_attr_no_mustprogess_loopmd(i32 %a, i32 %b) #0 {
-; CHECK: Function Attrs: mustprogress
-; CHECK-LABEL: define {{[^@]+}}@unknown_tripcount_mustprogress_attr_no_mustprogess_loopmd
-; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) [[ATTR0]] {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: unreachable
-;
-entry:
- br label %for.cond
-for.cond:
- %cmp = icmp slt i32 %a, %b
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.cond
-for.end:
- br label %for.cond1
-for.cond1:
- br label %for.cond1
-}
-
-;; Original C Code:
-;; void known_tripcount_no_mustprogress_attr_no_mustprogress_loopmd() {
-;; for (int i = 0; i < 5; i++) ;
-;; }
-
-define void @known_tripcount_no_mustprogress_attr_no_mustprogress_loopmd() {
-; CHECK-LABEL: define {{[^@]+}}@known_tripcount_no_mustprogress_attr_no_mustprogress_loopmd() {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
- %cmp = icmp slt i32 %i.0, 5
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.inc
-for.inc:
- %inc = add nsw i32 %i.0, 1
- br label %for.cond
-for.end:
- ret void
-}
-
-;; Original C Code:
-;; void known_tripcount_no_mustprogress_attr_mustprogress_loopmd() {
-;; for (int i = 0; i < 5; i++) ;
-;; }
-;; => Added mustprogress loop attribute
-
-define void @known_tripcount_no_mustprogress_attr_mustprogress_loopmd() {
-; CHECK-LABEL: define {{[^@]+}}@known_tripcount_no_mustprogress_attr_mustprogress_loopmd() {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
- %cmp = icmp slt i32 %i.0, 5
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.inc
-for.inc:
- %inc = add nsw i32 %i.0, 1
- br label %for.cond, !llvm.loop !4
-for.end:
- ret void
-}
-
-;; Original C Code:
-;; void known_tripcount_mustprogress_attr_no_mustprogress_loopmd() {
-;; for (int i = 0; i < 5; i++) ;
-;; }
-;; => Added mustprogress function attribute
-
-define void @known_tripcount_mustprogress_attr_no_mustprogress_loopmd() #0 {
-; CHECK: Function Attrs: mustprogress
-; CHECK-LABEL: define {{[^@]+}}@known_tripcount_mustprogress_attr_no_mustprogress_loopmd
-; CHECK-SAME: () [[ATTR0]] {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
- %cmp = icmp slt i32 %i.0, 5
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.inc
-for.inc:
- %inc = add nsw i32 %i.0, 1
- br label %for.cond
-for.end:
- ret void
-}
-
-;; Original C Code:
-;; void known_tripcount_mustprogress_attr_mustprogress_loopmd() {
-;; for (int i = 0; i < 5; i++) ;
-;; }
-;; => Added mustprogress function and mustprogress loop attribute
-
-define void @known_tripcount_mustprogress_attr_mustprogress_loopmd() #0 {
-; CHECK: Function Attrs: mustprogress
-; CHECK-LABEL: define {{[^@]+}}@known_tripcount_mustprogress_attr_mustprogress_loopmd
-; CHECK-SAME: () [[ATTR0]] {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
- %cmp = icmp slt i32 %i.0, 5
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.inc
-for.inc:
- %inc = add nsw i32 %i.0, 1
- br label %for.cond, !llvm.loop !5
-for.end:
- ret void
-}
-
-;; Original C Code:
-;; void unknown_tripcount_no_mustprogress_attr_mustprogress_loopmd(int a, int b) {
-;; for (; a < b;) ;
-;; }
-;; => Added mustprogress loop attribute
-
-define void @unknown_tripcount_no_mustprogress_attr_mustprogress_loopmd(i32 %a, i32 %b) {
-; CHECK-LABEL: define {{[^@]+}}@unknown_tripcount_no_mustprogress_attr_mustprogress_loopmd
-; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_END:%.*]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %cmp = icmp slt i32 %a, %b
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.cond, !llvm.loop !6
-for.end:
- ret void
-}
-
-;; Original C Code:
-;; void unknown_tripcount_no_mustprogress_attr_no_mustprogress_loopmd(int a, int b) {
-;; for (; a < b;) ;
-;; }
-
-define void @unknown_tripcount_no_mustprogress_attr_no_mustprogress_loopmd(i32 %a, i32 %b) {
-; CHECK-LABEL: define {{[^@]+}}@unknown_tripcount_no_mustprogress_attr_no_mustprogress_loopmd
-; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]]) {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[FOR_COND:%.*]]
-; CHECK: for.cond:
-; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[A]], [[B]]
-; CHECK-NEXT: br i1 [[CMP]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
-; CHECK: for.body:
-; CHECK-NEXT: br label [[FOR_COND]]
-; CHECK: for.end:
-; CHECK-NEXT: ret void
-;
-entry:
- br label %for.cond
-for.cond:
- %cmp = icmp slt i32 %a, %b
- br i1 %cmp, label %for.body, label %for.end
-for.body:
- br label %for.cond
-for.end:
- ret void
-}
-
-; CHECK: attributes [[ATTR0]] = { mustprogress }
-
-attributes #0 = { mustprogress }
-!2 = distinct !{!2, !3}
-!3 = !{!"llvm.loop.mustprogress"}
-!4 = distinct !{!4, !3}
-!5 = distinct !{!5, !3}
-!6 = distinct !{!6, !3}
diff --git a/llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll b/llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
index 1e68d4f95301..cd790903e8a1 100644
--- a/llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
+++ b/llvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
@@ -5,7 +5,14 @@ define void @f() #0 {
; CHECK: Function Attrs: mustprogress
; CHECK-LABEL: define {{[^@]+}}@f
; CHECK-SAME: () [[ATTR0:#.*]] {
-; CHECK-NEXT: unreachable
+; CHECK-NEXT: br label [[TMP1:%.*]]
+; CHECK: 1:
+; CHECK-NEXT: [[DOT01:%.*]] = phi i32 [ 1, [[TMP0:%.*]] ], [ [[TMP3:%.*]], [[TMP2:%.*]] ]
+; CHECK-NEXT: [[DOT0:%.*]] = phi i32 [ 1, [[TMP0]] ], [ [[TMP3]], [[TMP2]] ]
+; CHECK-NEXT: br label [[TMP2]]
+; CHECK: 2:
+; CHECK-NEXT: [[TMP3]] = add nsw i32 [[DOT01]], [[DOT0]]
+; CHECK-NEXT: br label [[TMP1]]
;
br label %1
diff --git a/llvm/test/Transforms/LoopDeletion/unreachable-loops.ll b/llvm/test/Transforms/LoopDeletion/unreachable-loops.ll
index d4a80b90e933..a74ddf99285e 100644
--- a/llvm/test/Transforms/LoopDeletion/unreachable-loops.ll
+++ b/llvm/test/Transforms/LoopDeletion/unreachable-loops.ll
@@ -216,7 +216,7 @@ exit:
; Show recursive deletion of loops. Since we start with subloops and progress outward
; to parent loop, we first delete the loop L2. Now loop L1 becomes a non-loop since it's backedge
; from L2's preheader to L1's exit block is never taken. So, L1 gets deleted as well.
-define void @test8(i64 %n) #0 {
+define void @test8(i64 %n) {
; CHECK-LABEL: test8
; CHECK-LABEL: entry:
; CHECK-NEXT: br label %exit
@@ -318,7 +318,7 @@ exit:
; deleted.
; In the next iteration, since L2 is never executed and has no subloops, we delete
; L2 as well. Finally, the outermost loop L1 is deleted.
-define void @test11(i64 %n) #0 {
+define void @test11(i64 %n) {
; CHECK-LABEL: test11
; CHECK-LABEL: entry:
; CHECK-NEXT: br label %exit
@@ -355,7 +355,7 @@ exit:
; 2 edges from a single exiting block to the exit block.
-define i64 @test12(i64 %n) #0 {
+define i64 @test12(i64 %n){
;CHECK-LABEL: @test12
; CHECK-NOT: L1:
; CHECK-NOT: L1Latch:
@@ -392,7 +392,7 @@ exit: ; preds = %L1Latch, %L1Latch
}
; multiple edges to exit block from the same exiting blocks
-define i64 @test13(i64 %n) #0 {
+define i64 @test13(i64 %n) {
; CHECK-LABEL: @test13
; CHECK-NOT: L1:
; CHECK-NOT: L1Latch:
@@ -433,5 +433,3 @@ exit: ; preds = %L1Block, %L1, %L1La
%y.phi = phi i64 [ 10, %L1Block ], [ 10, %L1Block ], [ %y.next, %L1 ], [ 30, %L1Latch ], [ 30, %L1Latch ]
ret i64 %y.phi
}
-
-attributes #0 = { willreturn }
diff --git a/llvm/test/Transforms/LoopDeletion/use-in-unreachable.ll b/llvm/test/Transforms/LoopDeletion/use-in-unreachable.ll
index 3e06e18fd5c3..ff7bc7566c05 100644
--- a/llvm/test/Transforms/LoopDeletion/use-in-unreachable.ll
+++ b/llvm/test/Transforms/LoopDeletion/use-in-unreachable.ll
@@ -3,7 +3,7 @@
; Checking that possible users of instruction from the loop in
; unreachable blocks are handled.
-define i64 @foo() willreturn {
+define i64 @foo() {
entry:
br label %invloop
; CHECK-LABEL-NOT: invloop
diff --git a/llvm/test/Transforms/SCCP/calltest.ll b/llvm/test/Transforms/SCCP/calltest.ll
index bd49b45c3486..a6c2606cb198 100644
--- a/llvm/test/Transforms/SCCP/calltest.ll
+++ b/llvm/test/Transforms/SCCP/calltest.ll
@@ -4,7 +4,7 @@ declare double @sqrt(double) readnone nounwind
%empty = type {}
declare %empty @has_side_effects()
-define double @test_0(i32 %param) willreturn {
+define double @test_0(i32 %param) {
; CHECK-LABEL: @test_0(
; CHECK-NOT: br
entry:
diff --git a/llvm/test/Transforms/SimpleLoopUnswitch/pr37888.ll b/llvm/test/Transforms/SimpleLoopUnswitch/pr37888.ll
index ea6d0e5b24a8..e8e34a2e8824 100644
--- a/llvm/test/Transforms/SimpleLoopUnswitch/pr37888.ll
+++ b/llvm/test/Transforms/SimpleLoopUnswitch/pr37888.ll
@@ -7,7 +7,7 @@
target triple = "x86_64-unknown-linux-gnu"
-define void @pr37888() willreturn {
+define void @pr37888() {
; CHECK-LABEL: define void @pr37888()
entry:
%tobool = icmp ne i16 undef, 0
More information about the llvm-commits
mailing list