[llvm] ff11d6b - [InstCombine] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 02:42:27 PDT 2023
Author: Nikita Popov
Date: 2023-03-14T10:42:01+01:00
New Revision: ff11d6b6f6e27f5de389002b8f6102b6cf3ed474
URL: https://github.com/llvm/llvm-project/commit/ff11d6b6f6e27f5de389002b8f6102b6cf3ed474
DIFF: https://github.com/llvm/llvm-project/commit/ff11d6b6f6e27f5de389002b8f6102b6cf3ed474.diff
LOG: [InstCombine] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/InstCombine/compare-3way.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/compare-3way.ll b/llvm/test/Transforms/InstCombine/compare-3way.ll
index 15d48f3064464..e2067368fb4c3 100644
--- a/llvm/test/Transforms/InstCombine/compare-3way.ll
+++ b/llvm/test/Transforms/InstCombine/compare-3way.ll
@@ -1,15 +1,25 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
declare void @use(i32)
; These 18 exercise all combinations of signed comparison
-; for each of the three values produced by your typical
+; for each of the three values produced by your typical
; 3way compare function (-1, 0, 1)
define void @test_low_sgt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_sgt
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_low_sgt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[CMP_NOT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP_NOT]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp ne i64 [[A]], [[B]]
+; CHECK-NEXT: [[RESULT:%.*]] = zext i1 [[EQ]] to i32
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -24,8 +34,14 @@ unreached:
}
define void @test_low_slt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_slt
-; CHECK: br i1 false, label %unreached, label %normal
+; CHECK-LABEL: define void @test_low_slt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 false, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -40,8 +56,19 @@ unreached:
}
define void @test_low_sge(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_sge
-; CHECK: br i1 true, label %unreached, label %normal
+; CHECK-LABEL: define void @test_low_sge
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 true, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: [[RESULT:%.*]] = select i1 [[EQ]], i32 0, i32 [[DOT]]
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -56,9 +83,16 @@ unreached:
}
define void @test_low_sle(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_sle
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_low_sle
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -73,9 +107,18 @@ unreached:
}
define void @test_low_ne(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_ne
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_low_ne
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp ne i64 [[A]], [[B]]
+; CHECK-NEXT: [[RESULT:%.*]] = zext i1 [[EQ]] to i32
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -90,9 +133,16 @@ unreached:
}
define void @test_low_eq(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_low_eq
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_low_eq
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -107,9 +157,16 @@ unreached:
}
define void @test_mid_sgt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_sgt
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_mid_sgt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -124,9 +181,16 @@ unreached:
}
define void @test_mid_slt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_slt
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_mid_slt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -141,9 +205,18 @@ unreached:
}
define void @test_mid_sge(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_sge
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_mid_sge
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[CMP_NOT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP_NOT]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp ne i64 [[A]], [[B]]
+; CHECK-NEXT: [[RESULT:%.*]] = zext i1 [[EQ]] to i32
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -158,9 +231,20 @@ unreached:
}
define void @test_mid_sle(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_sle
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_mid_sle
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[CMP_NOT:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP_NOT]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: [[RESULT:%.*]] = select i1 [[EQ]], i32 0, i32 [[DOT]]
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -175,9 +259,18 @@ unreached:
}
define void @test_mid_ne(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_ne
-; CHECK: [[TMP1:%.*]] = icmp eq i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_mid_ne
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[EQ]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: call void @use(i32 [[DOT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -192,9 +285,16 @@ unreached:
}
define void @test_mid_eq(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_mid_eq
-; CHECK: icmp eq i64 %a, %b
-; CHECK: br i1 %eq, label %unreached, label %normal
+; CHECK-LABEL: define void @test_mid_eq
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[EQ]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 0)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -209,8 +309,14 @@ unreached:
}
define void @test_high_sgt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_sgt
-; CHECK: br i1 false, label %unreached, label %normal
+; CHECK-LABEL: define void @test_high_sgt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 false, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -225,9 +331,20 @@ unreached:
}
define void @test_high_slt(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_slt
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_high_slt
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[CMP_NOT:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[CMP_NOT]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: [[RESULT:%.*]] = select i1 [[EQ]], i32 0, i32 [[DOT]]
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -242,9 +359,16 @@ unreached:
}
define void @test_high_sge(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_sge
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_high_sge
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -259,8 +383,19 @@ unreached:
}
define void @test_high_sle(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_sle
-; CHECK: br i1 true, label %unreached, label %normal
+; CHECK-LABEL: define void @test_high_sle
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 true, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: [[RESULT:%.*]] = select i1 [[EQ]], i32 0, i32 [[DOT]]
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -275,9 +410,20 @@ unreached:
}
define void @test_high_ne(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_ne
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %normal, label %unreached
+; CHECK-LABEL: define void @test_high_ne
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[NORMAL:%.*]], label [[UNREACHED:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: [[SLT:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: [[DOT:%.*]] = select i1 [[SLT]], i32 -1, i32 1
+; CHECK-NEXT: [[RESULT:%.*]] = select i1 [[EQ]], i32 0, i32 [[DOT]]
+; CHECK-NEXT: call void @use(i32 [[RESULT]])
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -292,9 +438,16 @@ unreached:
}
define void @test_high_eq(i64 %a, i64 %b) {
-; CHECK-LABEL: @test_high_eq
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @test_high_eq
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -1, i32 1
@@ -312,9 +465,16 @@ unreached:
; produced values
define void @non_standard_low(i64 %a, i64 %b) {
-; CHECK-LABEL: @non_standard_low
-; CHECK: [[TMP1:%.*]] = icmp slt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @non_standard_low
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp slt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -3)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -3, i32 -1
@@ -329,9 +489,16 @@ unreached:
}
define void @non_standard_mid(i64 %a, i64 %b) {
-; CHECK-LABEL: @non_standard_mid
-; CHECK: icmp eq i64 %a, %b
-; CHECK: br i1 %eq, label %unreached, label %normal
+; CHECK-LABEL: define void @non_standard_mid
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[EQ:%.*]] = icmp eq i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[EQ]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -2)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -3, i32 -1
@@ -346,9 +513,16 @@ unreached:
}
define void @non_standard_high(i64 %a, i64 %b) {
-; CHECK-LABEL: @non_standard_high
-; CHECK: [[TMP1:%.*]] = icmp sgt i64 %a, %b
-; CHECK: br i1 [[TMP1]], label %unreached, label %normal
+; CHECK-LABEL: define void @non_standard_high
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: [[TMP1:%.*]] = icmp sgt i64 [[A]], [[B]]
+; CHECK-NEXT: br i1 [[TMP1]], label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: call void @use(i32 -1)
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -3, i32 -1
@@ -363,8 +537,14 @@ unreached:
}
define void @non_standard_bound1(i64 %a, i64 %b) {
-; CHECK-LABEL: @non_standard_bound1
-; CHECK: br i1 false, label %unreached, label %normal
+; CHECK-LABEL: define void @non_standard_bound1
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 false, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -3, i32 -1
@@ -379,8 +559,14 @@ unreached:
}
define void @non_standard_bound2(i64 %a, i64 %b) {
-; CHECK-LABEL: @non_standard_bound2
-; CHECK: br i1 false, label %unreached, label %normal
+; CHECK-LABEL: define void @non_standard_bound2
+; CHECK-SAME: (i64 [[A:%.*]], i64 [[B:%.*]]) {
+; CHECK-NEXT: br i1 false, label [[UNREACHED:%.*]], label [[NORMAL:%.*]]
+; CHECK: normal:
+; CHECK-NEXT: ret void
+; CHECK: unreached:
+; CHECK-NEXT: ret void
+;
%eq = icmp eq i64 %a, %b
%slt = icmp slt i64 %a, %b
%. = select i1 %slt, i32 -3, i32 -1
More information about the llvm-commits
mailing list