[llvm] 463dad1 - [SimplifyCFG] Regenerate test checks (NFC)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 1 04:43:38 PST 2024
Author: DianQK
Date: 2024-01-01T20:43:03+08:00
New Revision: 463dad107f4cb60ae1d49138143d6797599fb1fb
URL: https://github.com/llvm/llvm-project/commit/463dad107f4cb60ae1d49138143d6797599fb1fb
DIFF: https://github.com/llvm/llvm-project/commit/463dad107f4cb60ae1d49138143d6797599fb1fb.diff
LOG: [SimplifyCFG] Regenerate test checks (NFC)
Use `UTC_ARGS: --version 4`.
Added:
Modified:
llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll b/llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll
index 1662bb99f27bcc..7c0d5e4f2b653c 100644
--- a/llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll
+++ b/llvm/test/Transforms/SimplifyCFG/switch-dead-default.ll
@@ -1,12 +1,13 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
; RUN: opt %s -S -passes='simplifycfg<switch-to-lookup>' -simplifycfg-require-and-preserve-domtree=1 -switch-range-to-icmp | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
declare void @foo(i32)
define void @test(i1 %a) {
-; CHECK-LABEL: @test(
-; CHECK-NEXT: [[A_OFF:%.*]] = add i1 [[A:%.*]], true
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: i1 [[A:%.*]]) {
+; CHECK-NEXT: [[A_OFF:%.*]] = add i1 [[A]], true
; CHECK-NEXT: [[SWITCH:%.*]] = icmp ult i1 [[A_OFF]], true
; CHECK-NEXT: br i1 [[SWITCH]], label [[TRUE:%.*]], label [[FALSE:%.*]]
; CHECK: common.ret:
@@ -32,12 +33,13 @@ default:
}
define void @test2(i2 %a) {
-; CHECK-LABEL: @test2(
-; CHECK-NEXT: switch i2 [[A:%.*]], label [[DOTUNREACHABLEDEFAULT:%.*]] [
-; CHECK-NEXT: i2 0, label [[CASE0:%.*]]
-; CHECK-NEXT: i2 1, label [[CASE1:%.*]]
-; CHECK-NEXT: i2 -2, label [[CASE2:%.*]]
-; CHECK-NEXT: i2 -1, label [[CASE3:%.*]]
+; CHECK-LABEL: define void @test2(
+; CHECK-SAME: i2 [[A:%.*]]) {
+; CHECK-NEXT: switch i2 [[A]], label [[DOTUNREACHABLEDEFAULT:%.*]] [
+; CHECK-NEXT: i2 0, label [[CASE0:%.*]]
+; CHECK-NEXT: i2 1, label [[CASE1:%.*]]
+; CHECK-NEXT: i2 -2, label [[CASE2:%.*]]
+; CHECK-NEXT: i2 -1, label [[CASE3:%.*]]
; CHECK-NEXT: ]
; CHECK: common.ret:
; CHECK-NEXT: ret void
@@ -80,11 +82,12 @@ default:
; This one is a negative test - we know the value of the default,
; but that's about it
define void @test3(i2 %a) {
-; CHECK-LABEL: @test3(
-; CHECK-NEXT: switch i2 [[A:%.*]], label [[DEFAULT:%.*]] [
-; CHECK-NEXT: i2 0, label [[CASE0:%.*]]
-; CHECK-NEXT: i2 1, label [[CASE1:%.*]]
-; CHECK-NEXT: i2 -2, label [[CASE2:%.*]]
+; CHECK-LABEL: define void @test3(
+; CHECK-SAME: i2 [[A:%.*]]) {
+; CHECK-NEXT: switch i2 [[A]], label [[DEFAULT:%.*]] [
+; CHECK-NEXT: i2 0, label [[CASE0:%.*]]
+; CHECK-NEXT: i2 1, label [[CASE1:%.*]]
+; CHECK-NEXT: i2 -2, label [[CASE2:%.*]]
; CHECK-NEXT: ]
; CHECK: common.ret:
; CHECK-NEXT: ret void
@@ -122,10 +125,11 @@ default:
; Negative test - check for possible overflow when computing
; number of possible cases.
define void @test4(i128 %a) {
-; CHECK-LABEL: @test4(
-; CHECK-NEXT: switch i128 [[A:%.*]], label [[DEFAULT:%.*]] [
-; CHECK-NEXT: i128 0, label [[CASE0:%.*]]
-; CHECK-NEXT: i128 1, label [[CASE1:%.*]]
+; CHECK-LABEL: define void @test4(
+; CHECK-SAME: i128 [[A:%.*]]) {
+; CHECK-NEXT: switch i128 [[A]], label [[DEFAULT:%.*]] [
+; CHECK-NEXT: i128 0, label [[CASE0:%.*]]
+; CHECK-NEXT: i128 1, label [[CASE1:%.*]]
; CHECK-NEXT: ]
; CHECK: common.ret:
; CHECK-NEXT: ret void
@@ -155,8 +159,9 @@ default:
; All but one bit known zero
define void @test5(i8 %a) {
-; CHECK-LABEL: @test5(
-; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[A:%.*]], 2
+; CHECK-LABEL: define void @test5(
+; CHECK-SAME: i8 [[A:%.*]]) {
+; CHECK-NEXT: [[CMP:%.*]] = icmp ult i8 [[A]], 2
; CHECK-NEXT: call void @llvm.assume(i1 [[CMP]])
; CHECK-NEXT: [[A_OFF:%.*]] = add i8 [[A]], -1
; CHECK-NEXT: [[SWITCH:%.*]] = icmp ult i8 [[A_OFF]], 1
@@ -187,8 +192,9 @@ default:
;; All but one bit known one
define void @test6(i8 %a) {
-; CHECK-LABEL: @test6(
-; CHECK-NEXT: [[AND:%.*]] = and i8 [[A:%.*]], -2
+; CHECK-LABEL: define void @test6(
+; CHECK-SAME: i8 [[A:%.*]]) {
+; CHECK-NEXT: [[AND:%.*]] = and i8 [[A]], -2
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[AND]], -2
; CHECK-NEXT: call void @llvm.assume(i1 [[CMP]])
; CHECK-NEXT: [[A_OFF:%.*]] = add i8 [[A]], 1
@@ -222,8 +228,9 @@ default:
; Check that we can eliminate both dead cases and dead defaults
; within a single run of simplifycfg
define void @test7(i8 %a) {
-; CHECK-LABEL: @test7(
-; CHECK-NEXT: [[AND:%.*]] = and i8 [[A:%.*]], -2
+; CHECK-LABEL: define void @test7(
+; CHECK-SAME: i8 [[A:%.*]]) {
+; CHECK-NEXT: [[AND:%.*]] = and i8 [[A]], -2
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[AND]], -2
; CHECK-NEXT: call void @llvm.assume(i1 [[CMP]])
; CHECK-NEXT: [[A_OFF:%.*]] = add i8 [[A]], 1
More information about the llvm-commits
mailing list