Skip to content

Commit 3a59a42

Browse files
committed
Add a test
1 parent 9fdc68a commit 3a59a42

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed

llvm/test/tools/UpdateTestChecks/lit.local.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ if os.path.isfile(llc_path):
3535
llc_arg = "--llc-binary " + shell_quote(llc_path)
3636
add_update_script_substitution("%update_llc_test_checks", extra_args=llc_arg)
3737
add_update_script_substitution("%update_mir_test_checks", extra_args=llc_arg)
38+
add_update_script_substitution("%update_givaluetracking_test_checks", extra_args=llc_arg)
3839

3940
opt_path = os.path.join(config.llvm_tools_dir, "opt")
4041
if os.path.isfile(opt_path):
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_givaluetracking_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple aarch64 -passes="print<gisel-value-tracking>" %s -filetype=null 2>&1 | FileCheck %s
3+
4+
---
5+
name: Cst
6+
body: |
7+
bb.1:
8+
%0:_(s8) = G_CONSTANT i8 1
9+
%1:_(s8) = COPY %0
10+
...
11+
---
12+
name: CstWithClass
13+
body: |
14+
bb.1:
15+
; Note: This comment should not be removed, the check lines below should be updated
16+
; CHECK-LABEL: name: @CstWithClass
17+
; CHECK-NEXT: %1:_ KnownBits:???????????????????????????????? SignBits:1
18+
%0:gpr32 = MOVi32imm 1
19+
%1:_(s32) = COPY %0
20+
...
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# NOTE: Assertions have been autogenerated by utils/update_givaluetracking_test_checks.py UTC_ARGS: --version 5
2+
# RUN: llc -mtriple aarch64 -passes="print<gisel-value-tracking>" %s -filetype=null 2>&1 | FileCheck %s
3+
4+
---
5+
name: Cst
6+
body: |
7+
bb.1:
8+
; CHECK-LABEL: name: @Cst
9+
; CHECK-NEXT: %0:_ KnownBits:00000001 SignBits:7
10+
; CHECK-NEXT: %1:_ KnownBits:00000001 SignBits:7
11+
%0:_(s8) = G_CONSTANT i8 1
12+
%1:_(s8) = COPY %0
13+
...
14+
---
15+
name: CstWithClass
16+
body: |
17+
bb.1:
18+
; Note: This comment should not be removed, the check lines below should be updated
19+
; CHECK-LABEL: name: @CstWithClass
20+
; CHECK-NEXT: %1:_ KnownBits:???????????????????????????????? SignBits:1
21+
%0:gpr32 = MOVi32imm 1
22+
%1:_(s32) = COPY %0
23+
...
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# REQUIRES: aarch64-registered-target
2+
# RUN: cp -f %S/Inputs/const.mir %t.mir && %update_givaluetracking_test_checks %t.mir
3+
# RUN: diff -u %S/Inputs/const.mir.expected %t.mir
4+
# RUN: FileCheck %t.mir < %t.mir
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These tests require llc.
2+
if "llc-binary" not in config.available_features:
3+
config.unsupported = True

0 commit comments

Comments
 (0)