[llvm] ad1d60b - [InstCombine] update test checks; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 11 15:20:25 PDT 2021
Author: Sanjay Patel
Date: 2021-06-11T18:20:14-04:00
New Revision: ad1d60bf5334ebdf6c6675f1e3b4a079078a5885
URL: https://github.com/llvm/llvm-project/commit/ad1d60bf5334ebdf6c6675f1e3b4a079078a5885
DIFF: https://github.com/llvm/llvm-project/commit/ad1d60bf5334ebdf6c6675f1e3b4a079078a5885.diff
LOG: [InstCombine] update test checks; NFC
Added:
Modified:
llvm/test/Transforms/InstCombine/intrinsics.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/intrinsics.ll b/llvm/test/Transforms/InstCombine/intrinsics.ll
index d2768373ece6c..9ac8427d84bf3 100644
--- a/llvm/test/Transforms/InstCombine/intrinsics.ll
+++ b/llvm/test/Transforms/InstCombine/intrinsics.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function powi
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -instcombine -S < %s | FileCheck %s
declare double @llvm.powi.f64(double, i32) nounwind readonly
@@ -59,7 +59,7 @@ define <2 x i32> @cttz_vec(<2 x i32> %a) {
; Make sure we don't add range metadata to i1 cttz.
define i1 @cttz_i1(i1 %arg) {
; CHECK-LABEL: @cttz_i1(
-; CHECK-NEXT: [[CNT:%.*]] = call i1 @llvm.cttz.i1(i1 [[ARG:%.*]], i1 false) #2
+; CHECK-NEXT: [[CNT:%.*]] = call i1 @llvm.cttz.i1(i1 [[ARG:%.*]], i1 false) #[[ATTR2:[0-9]+]]
; CHECK-NEXT: ret i1 [[CNT]]
;
%cnt = call i1 @llvm.cttz.i1(i1 %arg, i1 false) nounwind readnone
@@ -89,7 +89,7 @@ define <2 x i1> @cttz_knownbits_vec(<2 x i32> %arg) {
define i32 @cttz_knownbits2(i32 %arg) {
; CHECK-LABEL: @cttz_knownbits2(
; CHECK-NEXT: [[OR:%.*]] = or i32 [[ARG:%.*]], 4
-; CHECK-NEXT: [[CNT:%.*]] = call i32 @llvm.cttz.i32(i32 [[OR]], i1 true) #2, !range ![[$CTTZ_RANGE:[0-9]+]]
+; CHECK-NEXT: [[CNT:%.*]] = call i32 @llvm.cttz.i32(i32 [[OR]], i1 true) #[[ATTR2]], !range [[RNG0:![0-9]+]]
; CHECK-NEXT: ret i32 [[CNT]]
;
%or = or i32 %arg, 4
@@ -100,7 +100,7 @@ define i32 @cttz_knownbits2(i32 %arg) {
define <2 x i32> @cttz_knownbits2_vec(<2 x i32> %arg) {
; CHECK-LABEL: @cttz_knownbits2_vec(
; CHECK-NEXT: [[OR:%.*]] = or <2 x i32> [[ARG:%.*]], <i32 4, i32 4>
-; CHECK-NEXT: [[CNT:%.*]] = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> [[OR]], i1 true)
+; CHECK-NEXT: [[CNT:%.*]] = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> [[OR]], i1 true) #[[ATTR2]]
; CHECK-NEXT: ret <2 x i32> [[CNT]]
;
%or = or <2 x i32> %arg, <i32 4, i32 4>
@@ -151,7 +151,7 @@ define <2 x i8> @ctlz_vec(<2 x i8> %a) {
; Make sure we don't add range metadata to i1 ctlz.
define i1 @ctlz_i1(i1 %arg) {
; CHECK-LABEL: @ctlz_i1(
-; CHECK-NEXT: [[CNT:%.*]] = call i1 @llvm.ctlz.i1(i1 [[ARG:%.*]], i1 false) #2
+; CHECK-NEXT: [[CNT:%.*]] = call i1 @llvm.ctlz.i1(i1 [[ARG:%.*]], i1 false) #[[ATTR2]]
; CHECK-NEXT: ret i1 [[CNT]]
;
%cnt = call i1 @llvm.ctlz.i1(i1 %arg, i1 false) nounwind readnone
@@ -181,7 +181,7 @@ define <2 x i1> @ctlz_knownbits_vec(<2 x i8> %arg) {
define i8 @ctlz_knownbits2(i8 %arg) {
; CHECK-LABEL: @ctlz_knownbits2(
; CHECK-NEXT: [[OR:%.*]] = or i8 [[ARG:%.*]], 32
-; CHECK-NEXT: [[CNT:%.*]] = call i8 @llvm.ctlz.i8(i8 [[OR]], i1 true) #2, !range ![[$CTLZ_RANGE:[0-9]+]]
+; CHECK-NEXT: [[CNT:%.*]] = call i8 @llvm.ctlz.i8(i8 [[OR]], i1 true) #[[ATTR2]], !range [[RNG1:![0-9]+]]
; CHECK-NEXT: ret i8 [[CNT]]
;
%or = or i8 %arg, 32
@@ -192,7 +192,7 @@ define i8 @ctlz_knownbits2(i8 %arg) {
define <2 x i8> @ctlz_knownbits2_vec(<2 x i8> %arg) {
; CHECK-LABEL: @ctlz_knownbits2_vec(
; CHECK-NEXT: [[OR:%.*]] = or <2 x i8> [[ARG:%.*]], <i8 32, i8 32>
-; CHECK-NEXT: [[CNT:%.*]] = call <2 x i8> @llvm.ctlz.v2i8(<2 x i8> [[OR]], i1 true)
+; CHECK-NEXT: [[CNT:%.*]] = call <2 x i8> @llvm.ctlz.v2i8(<2 x i8> [[OR]], i1 true) #[[ATTR2]]
; CHECK-NEXT: ret <2 x i8> [[CNT]]
;
%or = or <2 x i8> %arg, <i8 32, i8 32>
@@ -237,13 +237,14 @@ define <2 x i32> @ctlz_undef_vec(<2 x i32> %Value) {
}
define i32 @ctlz_make_undef(i32 %a) {
+; CHECK-LABEL: @ctlz_make_undef(
+; CHECK-NEXT: [[OR:%.*]] = or i32 [[A:%.*]], 8
+; CHECK-NEXT: [[CTLZ:%.*]] = tail call i32 @llvm.ctlz.i32(i32 [[OR]], i1 true), !range [[RNG2:![0-9]+]]
+; CHECK-NEXT: ret i32 [[CTLZ]]
+;
%or = or i32 %a, 8
%ctlz = tail call i32 @llvm.ctlz.i32(i32 %or, i1 false)
ret i32 %ctlz
-; CHECK-LABEL: @ctlz_make_undef(
-; CHECK-NEXT: %or = or i32 %a, 8
-; CHECK-NEXT: %ctlz = tail call i32 @llvm.ctlz.i32(i32 %or, i1 true)
-; CHECK-NEXT: ret i32 %ctlz
}
define <2 x i32> @ctlz_make_undef_vec(<2 x i32> %a) {
@@ -274,13 +275,14 @@ define <2 x i32> @cttz_undef_vec(<2 x i32> %Value) nounwind {
}
define i32 @cttz_make_undef(i32 %a) {
+; CHECK-LABEL: @cttz_make_undef(
+; CHECK-NEXT: [[OR:%.*]] = or i32 [[A:%.*]], 8
+; CHECK-NEXT: [[CTTZ:%.*]] = tail call i32 @llvm.cttz.i32(i32 [[OR]], i1 true), !range [[RNG3:![0-9]+]]
+; CHECK-NEXT: ret i32 [[CTTZ]]
+;
%or = or i32 %a, 8
%cttz = tail call i32 @llvm.cttz.i32(i32 %or, i1 false)
ret i32 %cttz
-; CHECK-LABEL: @cttz_make_undef(
-; CHECK-NEXT: %or = or i32 %a, 8
-; CHECK-NEXT: %cttz = tail call i32 @llvm.cttz.i32(i32 %or, i1 true)
-; CHECK-NEXT: ret i32 %cttz
}
define <2 x i32> @cttz_make_undef_vec(<2 x i32> %a) {
@@ -296,8 +298,8 @@ define <2 x i32> @cttz_make_undef_vec(<2 x i32> %a) {
define i32 @ctlz_select(i32 %Value) nounwind {
; CHECK-LABEL: @ctlz_select(
-; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.ctlz.i32(i32 %Value, i1 false)
-; CHECK-NEXT: ret i32 [[TMP1]]
+; CHECK-NEXT: [[CTLZ:%.*]] = call i32 @llvm.ctlz.i32(i32 [[VALUE:%.*]], i1 false), !range [[RNG4:![0-9]+]]
+; CHECK-NEXT: ret i32 [[CTLZ]]
;
%tobool = icmp ne i32 %Value, 0
%ctlz = call i32 @llvm.ctlz.i32(i32 %Value, i1 true)
@@ -307,8 +309,8 @@ define i32 @ctlz_select(i32 %Value) nounwind {
define <2 x i32> @ctlz_select_vec(<2 x i32> %Value) nounwind {
; CHECK-LABEL: @ctlz_select_vec(
-; CHECK-NEXT: [[TMP1:%.*]] = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> [[VALUE:%.*]], i1 false)
-; CHECK-NEXT: ret <2 x i32> [[TMP1]]
+; CHECK-NEXT: [[CTLZ:%.*]] = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> [[VALUE:%.*]], i1 false)
+; CHECK-NEXT: ret <2 x i32> [[CTLZ]]
;
%tobool = icmp ne <2 x i32> %Value, zeroinitializer
%ctlz = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> %Value, i1 true)
@@ -318,8 +320,8 @@ define <2 x i32> @ctlz_select_vec(<2 x i32> %Value) nounwind {
define i32 @cttz_select(i32 %Value) nounwind {
; CHECK-LABEL: @cttz_select(
-; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.cttz.i32(i32 %Value, i1 false)
-; CHECK-NEXT: ret i32 [[TMP1]]
+; CHECK-NEXT: [[CTTZ:%.*]] = call i32 @llvm.cttz.i32(i32 [[VALUE:%.*]], i1 false), !range [[RNG4]]
+; CHECK-NEXT: ret i32 [[CTTZ]]
;
%tobool = icmp ne i32 %Value, 0
%cttz = call i32 @llvm.cttz.i32(i32 %Value, i1 true)
@@ -329,8 +331,8 @@ define i32 @cttz_select(i32 %Value) nounwind {
define <2 x i32> @cttz_select_vec(<2 x i32> %Value) nounwind {
; CHECK-LABEL: @cttz_select_vec(
-; CHECK-NEXT: [[TMP1:%.*]] = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> [[VALUE:%.*]], i1 false)
-; CHECK-NEXT: ret <2 x i32> [[TMP1]]
+; CHECK-NEXT: [[CTTZ:%.*]] = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> [[VALUE:%.*]], i1 false)
+; CHECK-NEXT: ret <2 x i32> [[CTTZ]]
;
%tobool = icmp ne <2 x i32> %Value, zeroinitializer
%cttz = call <2 x i32> @llvm.cttz.v2i32(<2 x i32> %Value, i1 true)
@@ -340,7 +342,7 @@ define <2 x i32> @cttz_select_vec(<2 x i32> %Value) nounwind {
define void @cos(double *%P) {
; CHECK-LABEL: @cos(
-; CHECK-NEXT: store volatile double 1.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 1.000000e+00, double* [[P:%.*]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.cos.f64(double 0.0) nounwind
@@ -351,7 +353,7 @@ define void @cos(double *%P) {
define void @sin(double *%P) {
; CHECK-LABEL: @sin(
-; CHECK-NEXT: store volatile double 0.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 0.000000e+00, double* [[P:%.*]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.sin.f64(double 0.0) nounwind
@@ -362,8 +364,8 @@ define void @sin(double *%P) {
define void @floor(double *%P) {
; CHECK-LABEL: @floor(
-; CHECK-NEXT: store volatile double 1.000000e+00, double* %P, align 8
-; CHECK-NEXT: store volatile double -2.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 1.000000e+00, double* [[P:%.*]], align 8
+; CHECK-NEXT: store volatile double -2.000000e+00, double* [[P]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.floor.f64(double 1.5) nounwind
@@ -375,8 +377,8 @@ define void @floor(double *%P) {
define void @ceil(double *%P) {
; CHECK-LABEL: @ceil(
-; CHECK-NEXT: store volatile double 2.000000e+00, double* %P, align 8
-; CHECK-NEXT: store volatile double -1.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 2.000000e+00, double* [[P:%.*]], align 8
+; CHECK-NEXT: store volatile double -1.000000e+00, double* [[P]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.ceil.f64(double 1.5) nounwind
@@ -388,8 +390,8 @@ define void @ceil(double *%P) {
define void @trunc(double *%P) {
; CHECK-LABEL: @trunc(
-; CHECK-NEXT: store volatile double 1.000000e+00, double* %P, align 8
-; CHECK-NEXT: store volatile double -1.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 1.000000e+00, double* [[P:%.*]], align 8
+; CHECK-NEXT: store volatile double -1.000000e+00, double* [[P]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.trunc.f64(double 1.5) nounwind
@@ -401,8 +403,8 @@ define void @trunc(double *%P) {
define void @rint(double *%P) {
; CHECK-LABEL: @rint(
-; CHECK-NEXT: store volatile double 2.000000e+00, double* %P, align 8
-; CHECK-NEXT: store volatile double -2.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 2.000000e+00, double* [[P:%.*]], align 8
+; CHECK-NEXT: store volatile double -2.000000e+00, double* [[P]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.rint.f64(double 1.5) nounwind
@@ -414,8 +416,8 @@ define void @rint(double *%P) {
define void @nearbyint(double *%P) {
; CHECK-LABEL: @nearbyint(
-; CHECK-NEXT: store volatile double 2.000000e+00, double* %P, align 8
-; CHECK-NEXT: store volatile double -2.000000e+00, double* %P, align 8
+; CHECK-NEXT: store volatile double 2.000000e+00, double* [[P:%.*]], align 8
+; CHECK-NEXT: store volatile double -2.000000e+00, double* [[P]], align 8
; CHECK-NEXT: ret void
;
%B = tail call double @llvm.nearbyint.f64(double 1.5) nounwind
@@ -425,5 +427,5 @@ define void @nearbyint(double *%P) {
ret void
}
-; CHECK: [[$CTTZ_RANGE]] = !{i32 0, i32 3}
-; CHECK: [[$CTLZ_RANGE]] = !{i8 0, i8 3}
+; CHECK: [[RNG0]] = !{i32 0, i32 3}
+; CHECK: [[RNG1]] = !{i8 0, i8 3}
More information about the llvm-commits
mailing list