[llvm] [Instcombine] Fix infinite loop in visitSelectInst. (PR #173704)

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 27 13:39:52 PST 2025


https://github.com/jlebar updated https://github.com/llvm/llvm-project/pull/173704

>From 29bf361dbb9aaa7268efc39cce66b4923a04e1e9 Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Mon, 22 Dec 2025 23:10:51 -0500
Subject: [PATCH 1/8] [Instcombine] Fix infinite loop in visitSelectInst.

Doing a nop replaceOperand leads us into an infinite loop here.

This was found by a fuzzer I'm working on.  The high-level design is to
randomly generate LLVM IR, run a pass on it, and then run the original
and new IR through the interpreter.  They should produce the same
results.  Right now I'm only fuzzing instcombine.
---
 .../InstCombine/InstCombineSelect.cpp         | 20 +++++++++--------
 .../instcombine-select-no-infinite-loop.ll    | 22 +++++++++++++++++++
 2 files changed, 33 insertions(+), 9 deletions(-)
 create mode 100644 llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll

diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index f52bac5e600cb..5a1b0bc4d5f5f 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -4790,18 +4790,20 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
   // select (trunc nsw X to i1), X, Y --> select (trunc nsw X to i1), -1, Y
   // select (trunc nsw X to i1), Y, X --> select (trunc nsw X to i1), Y, 0
   Value *Trunc;
+  auto Zero = [&]() { return ConstantInt::get(SelType, 0); };
+  auto One = [&]() { return ConstantInt::get(SelType, 1); };
+  auto MinusOne = [&]() { return ConstantInt::getAllOnesValue(SelType); };
   if (match(CondVal, m_NUWTrunc(m_Value(Trunc)))) {
-    if (TrueVal == Trunc)
-      return replaceOperand(SI, 1, ConstantInt::get(TrueVal->getType(), 1));
-    if (FalseVal == Trunc)
-      return replaceOperand(SI, 2, ConstantInt::get(FalseVal->getType(), 0));
+    if (TrueVal == Trunc && TrueVal != One())
+      return replaceOperand(SI, 1, One());
+    if (FalseVal == Trunc && FalseVal != Zero())
+      return replaceOperand(SI, 2, Zero());
   }
   if (match(CondVal, m_NSWTrunc(m_Value(Trunc)))) {
-    if (TrueVal == Trunc)
-      return replaceOperand(SI, 1,
-                            Constant::getAllOnesValue(TrueVal->getType()));
-    if (FalseVal == Trunc)
-      return replaceOperand(SI, 2, ConstantInt::get(FalseVal->getType(), 0));
+    if (TrueVal == Trunc && TrueVal != MinusOne())
+      return replaceOperand(SI, 1, MinusOne());
+    if (FalseVal == Trunc && FalseVal != Zero())
+      return replaceOperand(SI, 2, Zero());
   }
 
   Value *MaskedLoadPtr;
diff --git a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
new file mode 100644
index 0000000000000..ec9a6bf46b3aa
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
@@ -0,0 +1,22 @@
+; Just check that this completes without hitting an infinite loop.
+; RUN: opt < %s --passes=instcombine -S > /dev/null
+
+define i1 @f(i2 %0, i2 %1, i1 %2, i2 %3) {
+entry:
+  %4 = icmp sgt i2 0, %0
+  %5 = zext i1 %2 to i2
+  %6 = select i1 %4, i2 0, i2 %5
+  %7 = trunc i2 %6 to i1
+  %8 = select i1 %7, i2 %1, i2 0
+  %9 = icmp sle i1 %4, %7
+  %10 = select i1 %9, i2 0, i2 %1
+  %11 = and i2 %5, %10
+  %12 = select i1 %2, i2 0, i2 %3
+  %13 = sdiv i2 1, %12
+  %14 = icmp uge i2 %8, %11
+  %15 = sext i1 %14 to i2
+  %16 = icmp sgt i2 %13, %15
+  %17 = icmp sgt i2 %6, 0
+  %18 = lshr i1 %16, %17
+  ret i1 %18
+}

>From ab79dea75deb778f5c4e5ad9223212e1d05a0f0c Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 13:37:37 -0500
Subject: [PATCH 2/8] [InstCombine] Avoid trunc constants in select fold

---
 llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index 5a1b0bc4d5f5f..45141345bf06e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -4793,13 +4793,13 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
   auto Zero = [&]() { return ConstantInt::get(SelType, 0); };
   auto One = [&]() { return ConstantInt::get(SelType, 1); };
   auto MinusOne = [&]() { return ConstantInt::getAllOnesValue(SelType); };
-  if (match(CondVal, m_NUWTrunc(m_Value(Trunc)))) {
+  if (match(CondVal, m_NUWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
     if (TrueVal == Trunc && TrueVal != One())
       return replaceOperand(SI, 1, One());
     if (FalseVal == Trunc && FalseVal != Zero())
       return replaceOperand(SI, 2, Zero());
   }
-  if (match(CondVal, m_NSWTrunc(m_Value(Trunc)))) {
+  if (match(CondVal, m_NSWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
     if (TrueVal == Trunc && TrueVal != MinusOne())
       return replaceOperand(SI, 1, MinusOne());
     if (FalseVal == Trunc && FalseVal != Zero())

>From 64e1a126f3b1f99ff40805a6fcb056cb9a1bdcb9 Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 13:44:48 -0500
Subject: [PATCH 3/8] [InstCombine] Drop select fold helper lambdas

---
 .../InstCombine/InstCombineSelect.cpp         | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index 45141345bf06e..e138db5f4168a 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -4790,20 +4790,17 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
   // select (trunc nsw X to i1), X, Y --> select (trunc nsw X to i1), -1, Y
   // select (trunc nsw X to i1), Y, X --> select (trunc nsw X to i1), Y, 0
   Value *Trunc;
-  auto Zero = [&]() { return ConstantInt::get(SelType, 0); };
-  auto One = [&]() { return ConstantInt::get(SelType, 1); };
-  auto MinusOne = [&]() { return ConstantInt::getAllOnesValue(SelType); };
   if (match(CondVal, m_NUWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
-    if (TrueVal == Trunc && TrueVal != One())
-      return replaceOperand(SI, 1, One());
-    if (FalseVal == Trunc && FalseVal != Zero())
-      return replaceOperand(SI, 2, Zero());
+    if (TrueVal == Trunc && TrueVal != ConstantInt::get(SelType, 1))
+      return replaceOperand(SI, 1, ConstantInt::get(SelType, 1));
+    if (FalseVal == Trunc && FalseVal != ConstantInt::get(SelType, 0))
+      return replaceOperand(SI, 2, ConstantInt::get(SelType, 0));
   }
   if (match(CondVal, m_NSWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
-    if (TrueVal == Trunc && TrueVal != MinusOne())
-      return replaceOperand(SI, 1, MinusOne());
-    if (FalseVal == Trunc && FalseVal != Zero())
-      return replaceOperand(SI, 2, Zero());
+    if (TrueVal == Trunc && TrueVal != ConstantInt::getAllOnesValue(SelType))
+      return replaceOperand(SI, 1, ConstantInt::getAllOnesValue(SelType));
+    if (FalseVal == Trunc && FalseVal != ConstantInt::get(SelType, 0))
+      return replaceOperand(SI, 2, ConstantInt::get(SelType, 0));
   }
 
   Value *MaskedLoadPtr;

>From 07f078153393a6c997beaa8f28188ae39569adb4 Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 14:09:52 -0500
Subject: [PATCH 4/8] Another fix

---
 .../InstCombine/InstCombineSelect.cpp           | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index e138db5f4168a..d107294a0e721 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -4791,16 +4791,17 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
   // select (trunc nsw X to i1), Y, X --> select (trunc nsw X to i1), Y, 0
   Value *Trunc;
   if (match(CondVal, m_NUWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
-    if (TrueVal == Trunc && TrueVal != ConstantInt::get(SelType, 1))
-      return replaceOperand(SI, 1, ConstantInt::get(SelType, 1));
-    if (FalseVal == Trunc && FalseVal != ConstantInt::get(SelType, 0))
-      return replaceOperand(SI, 2, ConstantInt::get(SelType, 0));
+    if (TrueVal == Trunc)
+      return replaceOperand(SI, 1, ConstantInt::get(TrueVal->getType(), 1));
+    if (FalseVal == Trunc)
+      return replaceOperand(SI, 2, ConstantInt::get(FalseVal->getType(), 0));
   }
   if (match(CondVal, m_NSWTrunc(m_Value(Trunc))) && !isa<Constant>(Trunc)) {
-    if (TrueVal == Trunc && TrueVal != ConstantInt::getAllOnesValue(SelType))
-      return replaceOperand(SI, 1, ConstantInt::getAllOnesValue(SelType));
-    if (FalseVal == Trunc && FalseVal != ConstantInt::get(SelType, 0))
-      return replaceOperand(SI, 2, ConstantInt::get(SelType, 0));
+    if (TrueVal == Trunc)
+      return replaceOperand(SI, 1,
+                            Constant::getAllOnesValue(TrueVal->getType()));
+    if (FalseVal == Trunc)
+      return replaceOperand(SI, 2, ConstantInt::get(FalseVal->getType(), 0));
   }
 
   Value *MaskedLoadPtr;

>From e6bc68aa3b8bddb8435ea6240a28370d9faa5c0f Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 14:20:04 -0500
Subject: [PATCH 5/8] [InstCombine] Refresh no-infinite-loop test

---
 .../instcombine-select-no-infinite-loop.ll    | 24 ++++++++++++-------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
index ec9a6bf46b3aa..2a544829af26b 100644
--- a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
+++ b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
@@ -1,17 +1,25 @@
-; Just check that this completes without hitting an infinite loop.
-; RUN: opt < %s --passes=instcombine -S > /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; NOTE: Regression test for an InstCombine infinite loop.
+; RUN: opt -passes=instcombine,instnamer -S < %s | FileCheck %s
 
-define i1 @f(i2 %0, i2 %1, i1 %2, i2 %3) {
+define i1 @f(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
+; CHECK-LABEL: define i1 @f(
+; CHECK-SAME: i2 [[ARG0:%.*]], i2 [[ARG1:%.*]], i1 [[ARG2:%.*]], i2 [[ARG3:%.*]]) {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[DOTFR:%.*]] = freeze i2 [[ARG3]]
+; CHECK-NEXT:    [[I:%.*]] = icmp ne i2 [[DOTFR]], -1
+; CHECK-NEXT:    ret i1 [[I]]
+;
 entry:
-  %4 = icmp sgt i2 0, %0
-  %5 = zext i1 %2 to i2
+  %4 = icmp sgt i2 0, %arg0
+  %5 = zext i1 %arg2 to i2
   %6 = select i1 %4, i2 0, i2 %5
   %7 = trunc i2 %6 to i1
-  %8 = select i1 %7, i2 %1, i2 0
+  %8 = select i1 %7, i2 %arg1, i2 0
   %9 = icmp sle i1 %4, %7
-  %10 = select i1 %9, i2 0, i2 %1
+  %10 = select i1 %9, i2 0, i2 %arg1
   %11 = and i2 %5, %10
-  %12 = select i1 %2, i2 0, i2 %3
+  %12 = select i1 %arg2, i2 0, i2 %arg3
   %13 = sdiv i2 1, %12
   %14 = icmp uge i2 %8, %11
   %15 = sext i1 %14 to i2

>From 27ea8c4fb4e433bf69c4d097d78225709e1c5078 Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 14:22:55 -0500
Subject: [PATCH 6/8] [InstCombine] Drop instnamer from select loop test

---
 .../instcombine-select-no-infinite-loop.ll    | 34 +++++++++----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
index 2a544829af26b..78c0f34eee9a0 100644
--- a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
+++ b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
 ; NOTE: Regression test for an InstCombine infinite loop.
-; RUN: opt -passes=instcombine,instnamer -S < %s | FileCheck %s
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
 
 define i1 @f(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
 ; CHECK-LABEL: define i1 @f(
@@ -11,20 +11,20 @@ define i1 @f(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
 ; CHECK-NEXT:    ret i1 [[I]]
 ;
 entry:
-  %4 = icmp sgt i2 0, %arg0
-  %5 = zext i1 %arg2 to i2
-  %6 = select i1 %4, i2 0, i2 %5
-  %7 = trunc i2 %6 to i1
-  %8 = select i1 %7, i2 %arg1, i2 0
-  %9 = icmp sle i1 %4, %7
-  %10 = select i1 %9, i2 0, i2 %arg1
-  %11 = and i2 %5, %10
-  %12 = select i1 %arg2, i2 0, i2 %arg3
-  %13 = sdiv i2 1, %12
-  %14 = icmp uge i2 %8, %11
-  %15 = sext i1 %14 to i2
-  %16 = icmp sgt i2 %13, %15
-  %17 = icmp sgt i2 %6, 0
-  %18 = lshr i1 %16, %17
-  ret i1 %18
+  %cmp0 = icmp sgt i2 0, %arg0
+  %zext = zext i1 %arg2 to i2
+  %sel0 = select i1 %cmp0, i2 0, i2 %zext
+  %trunc = trunc i2 %sel0 to i1
+  %sel1 = select i1 %trunc, i2 %arg1, i2 0
+  %cmp1 = icmp sle i1 %cmp0, %trunc
+  %sel2 = select i1 %cmp1, i2 0, i2 %arg1
+  %and = and i2 %zext, %sel2
+  %sel3 = select i1 %arg2, i2 0, i2 %arg3
+  %div = sdiv i2 1, %sel3
+  %cmp2 = icmp uge i2 %sel1, %and
+  %sext = sext i1 %cmp2 to i2
+  %cmp3 = icmp sgt i2 %div, %sext
+  %cmp4 = icmp sgt i2 %sel0, 0
+  %lshr = lshr i1 %cmp3, %cmp4
+  ret i1 %lshr
 }

>From e319de9facecd40163979eb2aa4f7c1a673b7cf7 Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 16:35:25 -0500
Subject: [PATCH 7/8] [InstCombine] Move select loop test into select-hang

---
 .../InstCombine/2012-05-28-select-hang.ll     | 28 +++++++++++++++++
 .../instcombine-select-no-infinite-loop.ll    | 30 -------------------
 2 files changed, 28 insertions(+), 30 deletions(-)
 delete mode 100644 llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll

diff --git a/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll b/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
index b4efe6126763e..16d789dda298d 100644
--- a/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
+++ b/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
@@ -37,3 +37,31 @@ land.end:                                         ; preds = %land.rhs, %entry
 ; CHECK-LABEL: @func(
 ; CHECK-NOT: select
 }
+
+; NOTE: Regression test for an InstCombine infinite loop.
+define i1 @select_no_infinite_loop(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
+; CHECK-LABEL: define i1 @select_no_infinite_loop(
+; CHECK-SAME: i2 [[ARG0:%.*]], i2 [[ARG1:%.*]], i1 [[ARG2:%.*]], i2 [[ARG3:%.*]]) {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[DOTFR:%.*]] = freeze i2 [[ARG3]]
+; CHECK-NEXT:    [[I:%.*]] = icmp ne i2 [[DOTFR]], -1
+; CHECK-NEXT:    ret i1 [[I]]
+;
+entry:
+  %cmp0 = icmp sgt i2 0, %arg0
+  %zext = zext i1 %arg2 to i2
+  %sel0 = select i1 %cmp0, i2 0, i2 %zext
+  %trunc = trunc i2 %sel0 to i1
+  %sel1 = select i1 %trunc, i2 %arg1, i2 0
+  %cmp1 = icmp sle i1 %cmp0, %trunc
+  %sel2 = select i1 %cmp1, i2 0, i2 %arg1
+  %and = and i2 %zext, %sel2
+  %sel3 = select i1 %arg2, i2 0, i2 %arg3
+  %div = sdiv i2 1, %sel3
+  %cmp2 = icmp uge i2 %sel1, %and
+  %sext = sext i1 %cmp2 to i2
+  %cmp3 = icmp sgt i2 %div, %sext
+  %cmp4 = icmp sgt i2 %sel0, 0
+  %lshr = lshr i1 %cmp3, %cmp4
+  ret i1 %lshr
+}
diff --git a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll b/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
deleted file mode 100644
index 78c0f34eee9a0..0000000000000
--- a/llvm/test/Transforms/InstCombine/instcombine-select-no-infinite-loop.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
-; NOTE: Regression test for an InstCombine infinite loop.
-; RUN: opt -passes=instcombine -S < %s | FileCheck %s
-
-define i1 @f(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
-; CHECK-LABEL: define i1 @f(
-; CHECK-SAME: i2 [[ARG0:%.*]], i2 [[ARG1:%.*]], i1 [[ARG2:%.*]], i2 [[ARG3:%.*]]) {
-; CHECK-NEXT:  [[ENTRY:.*:]]
-; CHECK-NEXT:    [[DOTFR:%.*]] = freeze i2 [[ARG3]]
-; CHECK-NEXT:    [[I:%.*]] = icmp ne i2 [[DOTFR]], -1
-; CHECK-NEXT:    ret i1 [[I]]
-;
-entry:
-  %cmp0 = icmp sgt i2 0, %arg0
-  %zext = zext i1 %arg2 to i2
-  %sel0 = select i1 %cmp0, i2 0, i2 %zext
-  %trunc = trunc i2 %sel0 to i1
-  %sel1 = select i1 %trunc, i2 %arg1, i2 0
-  %cmp1 = icmp sle i1 %cmp0, %trunc
-  %sel2 = select i1 %cmp1, i2 0, i2 %arg1
-  %and = and i2 %zext, %sel2
-  %sel3 = select i1 %arg2, i2 0, i2 %arg3
-  %div = sdiv i2 1, %sel3
-  %cmp2 = icmp uge i2 %sel1, %and
-  %sext = sext i1 %cmp2 to i2
-  %cmp3 = icmp sgt i2 %div, %sext
-  %cmp4 = icmp sgt i2 %sel0, 0
-  %lshr = lshr i1 %cmp3, %cmp4
-  ret i1 %lshr
-}

>From e58884c817a66f0485457ab5d6cdad80a9ee607b Mon Sep 17 00:00:00 2001
From: Justin Lebar <justin.lebar at gmail.com>
Date: Sat, 27 Dec 2025 16:38:57 -0500
Subject: [PATCH 8/8] [InstCombine] Drop note for select loop test

---
 llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll b/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
index 16d789dda298d..e596c22a31e69 100644
--- a/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
+++ b/llvm/test/Transforms/InstCombine/2012-05-28-select-hang.ll
@@ -38,7 +38,6 @@ land.end:                                         ; preds = %land.rhs, %entry
 ; CHECK-NOT: select
 }
 
-; NOTE: Regression test for an InstCombine infinite loop.
 define i1 @select_no_infinite_loop(i2 %arg0, i2 %arg1, i1 %arg2, i2 %arg3) {
 ; CHECK-LABEL: define i1 @select_no_infinite_loop(
 ; CHECK-SAME: i2 [[ARG0:%.*]], i2 [[ARG1:%.*]], i1 [[ARG2:%.*]], i2 [[ARG3:%.*]]) {



More information about the llvm-commits mailing list