aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greene <david.greene@cerebras.net>2022-01-28 17:06:51 -0800
committerDavid Greene <david.greene@cerebras.net>2022-01-28 17:06:51 -0800
commit7e32d2b21a58ad71432f1403227dbf739f39c345 (patch)
tree0ad623dc6fe29f5ce8dbff328a3221bcd036fbc7
parent4465c299069f3ff5b93ba648edf699faf7f39e79 (diff)
downloadllvm-7e32d2b21a58ad71432f1403227dbf739f39c345.zip
llvm-7e32d2b21a58ad71432f1403227dbf739f39c345.tar.gz
llvm-7e32d2b21a58ad71432f1403227dbf739f39c345.tar.bz2
Revert "[UpdateTestChecks] Add --filter and --filter-out options"
Broke some update-test-checks tests. Reverting while developing a fix. This reverts commit 030f71698d52f228929da5e3148602f4a3daff7d.
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll38
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected54
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected45
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected57
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.nofilter.expected61
-rw-r--r--llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-filter.test33
-rw-r--r--llvm/utils/UpdateTestChecks/asm.py7
-rw-r--r--llvm/utils/UpdateTestChecks/common.py172
-rwxr-xr-xllvm/utils/update_cc_test_checks.py3
-rwxr-xr-xllvm/utils/update_llc_test_checks.py8
-rwxr-xr-xllvm/utils/update_test_checks.py6
11 files changed, 22 insertions, 462 deletions
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll
deleted file mode 100644
index 37a7f22..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll
+++ /dev/null
@@ -1,38 +0,0 @@
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s
-
-define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
- %v0 = load i32, i32* %loadptr, align 1
- %cast = bitcast i8* %B to <8 x float>*
- %A2 = fadd <8 x float> %A, <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>
- store <8 x float> %A2, <8 x float>* %cast, align 32, !nontemporal !0
- %v1 = load i32, i32* %loadptr, align 1
- %cast1 = bitcast i8* %B to <4 x i64>*
- %E2 = add <4 x i64> %E, <i64 1, i64 2, i64 3, i64 4>
- store <4 x i64> %E2, <4 x i64>* %cast1, align 32, !nontemporal !0
- %v2 = load i32, i32* %loadptr, align 1
- %cast2 = bitcast i8* %B to <4 x double>*
- %C2 = fadd <4 x double> %C, <double 1.0, double 2.0, double 3.0, double 4.0>
- store <4 x double> %C2, <4 x double>* %cast2, align 32, !nontemporal !0
- %v3 = load i32, i32* %loadptr, align 1
- %cast3 = bitcast i8* %B to <8 x i32>*
- %F2 = add <8 x i32> %F, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
- store <8 x i32> %F2, <8 x i32>* %cast3, align 32, !nontemporal !0
- %v4 = load i32, i32* %loadptr, align 1
- %cast4 = bitcast i8* %B to <16 x i16>*
- %G2 = add <16 x i16> %G, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
- store <16 x i16> %G2, <16 x i16>* %cast4, align 32, !nontemporal !0
- %v5 = load i32, i32* %loadptr, align 1
- %cast5 = bitcast i8* %B to <32 x i8>*
- %H2 = add <32 x i8> %H, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
- store <32 x i8> %H2, <32 x i8>* %cast5, align 32, !nontemporal !0
- %v6 = load i32, i32* %loadptr, align 1
- %sum1 = add i32 %v0, %v1
- %sum2 = add i32 %sum1, %v2
- %sum3 = add i32 %sum2, %v3
- %sum4 = add i32 %sum3, %v4
- %sum5 = add i32 %sum4, %v5
- %sum6 = add i32 %sum5, %v6
- ret i32 %sum5
-}
-
-!0 = !{i32 1}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
deleted file mode 100644
index 49577b7..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter-out.expected
+++ /dev/null
@@ -1,54 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "movnt"
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s
-
-define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
-; CHECK-LABEL: f:
-; CHECK: movl (%rsi), %eax
-; CHECK: vaddps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
-; CHECK: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm1, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vpaddd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm3, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vpaddw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm4, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vpaddb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm5, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vzeroupper
-; CHECK: retq
- %v0 = load i32, i32* %loadptr, align 1
- %cast = bitcast i8* %B to <8 x float>*
- %A2 = fadd <8 x float> %A, <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>
- store <8 x float> %A2, <8 x float>* %cast, align 32, !nontemporal !0
- %v1 = load i32, i32* %loadptr, align 1
- %cast1 = bitcast i8* %B to <4 x i64>*
- %E2 = add <4 x i64> %E, <i64 1, i64 2, i64 3, i64 4>
- store <4 x i64> %E2, <4 x i64>* %cast1, align 32, !nontemporal !0
- %v2 = load i32, i32* %loadptr, align 1
- %cast2 = bitcast i8* %B to <4 x double>*
- %C2 = fadd <4 x double> %C, <double 1.0, double 2.0, double 3.0, double 4.0>
- store <4 x double> %C2, <4 x double>* %cast2, align 32, !nontemporal !0
- %v3 = load i32, i32* %loadptr, align 1
- %cast3 = bitcast i8* %B to <8 x i32>*
- %F2 = add <8 x i32> %F, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
- store <8 x i32> %F2, <8 x i32>* %cast3, align 32, !nontemporal !0
- %v4 = load i32, i32* %loadptr, align 1
- %cast4 = bitcast i8* %B to <16 x i16>*
- %G2 = add <16 x i16> %G, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
- store <16 x i16> %G2, <16 x i16>* %cast4, align 32, !nontemporal !0
- %v5 = load i32, i32* %loadptr, align 1
- %cast5 = bitcast i8* %B to <32 x i8>*
- %H2 = add <32 x i8> %H, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
- store <32 x i8> %H2, <32 x i8>* %cast5, align 32, !nontemporal !0
- %v6 = load i32, i32* %loadptr, align 1
- %sum1 = add i32 %v0, %v1
- %sum2 = add i32 %sum1, %v2
- %sum3 = add i32 %sum2, %v3
- %sum4 = add i32 %sum3, %v4
- %sum5 = add i32 %sum4, %v5
- %sum6 = add i32 %sum5, %v6
- ret i32 %sum5
-}
-
-!0 = !{i32 1}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
deleted file mode 100644
index 3ab1ea0..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.filter.expected
+++ /dev/null
@@ -1,45 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter "movnt"
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s
-
-define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
-; CHECK-LABEL: f:
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vmovntpd %ymm0, (%rdi)
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vmovntdq %ymm0, (%rdi)
- %v0 = load i32, i32* %loadptr, align 1
- %cast = bitcast i8* %B to <8 x float>*
- %A2 = fadd <8 x float> %A, <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>
- store <8 x float> %A2, <8 x float>* %cast, align 32, !nontemporal !0
- %v1 = load i32, i32* %loadptr, align 1
- %cast1 = bitcast i8* %B to <4 x i64>*
- %E2 = add <4 x i64> %E, <i64 1, i64 2, i64 3, i64 4>
- store <4 x i64> %E2, <4 x i64>* %cast1, align 32, !nontemporal !0
- %v2 = load i32, i32* %loadptr, align 1
- %cast2 = bitcast i8* %B to <4 x double>*
- %C2 = fadd <4 x double> %C, <double 1.0, double 2.0, double 3.0, double 4.0>
- store <4 x double> %C2, <4 x double>* %cast2, align 32, !nontemporal !0
- %v3 = load i32, i32* %loadptr, align 1
- %cast3 = bitcast i8* %B to <8 x i32>*
- %F2 = add <8 x i32> %F, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
- store <8 x i32> %F2, <8 x i32>* %cast3, align 32, !nontemporal !0
- %v4 = load i32, i32* %loadptr, align 1
- %cast4 = bitcast i8* %B to <16 x i16>*
- %G2 = add <16 x i16> %G, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
- store <16 x i16> %G2, <16 x i16>* %cast4, align 32, !nontemporal !0
- %v5 = load i32, i32* %loadptr, align 1
- %cast5 = bitcast i8* %B to <32 x i8>*
- %H2 = add <32 x i8> %H, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
- store <32 x i8> %H2, <32 x i8>* %cast5, align 32, !nontemporal !0
- %v6 = load i32, i32* %loadptr, align 1
- %sum1 = add i32 %v0, %v1
- %sum2 = add i32 %sum1, %v2
- %sum3 = add i32 %sum2, %v3
- %sum4 = add i32 %sum3, %v4
- %sum5 = add i32 %sum4, %v5
- %sum6 = add i32 %sum5, %v6
- ret i32 %sum5
-}
-
-!0 = !{i32 1}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
deleted file mode 100644
index 46a9b54..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.multifilter.expected
+++ /dev/null
@@ -1,57 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter "LCPI[0-9]+_[0-9]+" --filter "movnt" --filter "(%esp|%rsi)"
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s
-
-define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
-; CHECK-LABEL: f:
-; CHECK: vaddps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
-; CHECK: vmovntps %ymm0, (%rdi)
-; CHECK: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm1, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vmovntpd %ymm0, (%rdi)
-; CHECK: vpaddd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm3, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vpaddw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm4, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vmovntdq %ymm0, (%rdi)
-; CHECK: vpaddb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm5, %ymm0
-; CHECK: addl (%rsi), %eax
-; CHECK: vmovntdq %ymm0, (%rdi)
- %v0 = load i32, i32* %loadptr, align 1
- %cast = bitcast i8* %B to <8 x float>*
- %A2 = fadd <8 x float> %A, <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>
- store <8 x float> %A2, <8 x float>* %cast, align 32, !nontemporal !0
- %v1 = load i32, i32* %loadptr, align 1
- %cast1 = bitcast i8* %B to <4 x i64>*
- %E2 = add <4 x i64> %E, <i64 1, i64 2, i64 3, i64 4>
- store <4 x i64> %E2, <4 x i64>* %cast1, align 32, !nontemporal !0
- %v2 = load i32, i32* %loadptr, align 1
- %cast2 = bitcast i8* %B to <4 x double>*
- %C2 = fadd <4 x double> %C, <double 1.0, double 2.0, double 3.0, double 4.0>
- store <4 x double> %C2, <4 x double>* %cast2, align 32, !nontemporal !0
- %v3 = load i32, i32* %loadptr, align 1
- %cast3 = bitcast i8* %B to <8 x i32>*
- %F2 = add <8 x i32> %F, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
- store <8 x i32> %F2, <8 x i32>* %cast3, align 32, !nontemporal !0
- %v4 = load i32, i32* %loadptr, align 1
- %cast4 = bitcast i8* %B to <16 x i16>*
- %G2 = add <16 x i16> %G, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
- store <16 x i16> %G2, <16 x i16>* %cast4, align 32, !nontemporal !0
- %v5 = load i32, i32* %loadptr, align 1
- %cast5 = bitcast i8* %B to <32 x i8>*
- %H2 = add <32 x i8> %H, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
- store <32 x i8> %H2, <32 x i8>* %cast5, align 32, !nontemporal !0
- %v6 = load i32, i32* %loadptr, align 1
- %sum1 = add i32 %v0, %v1
- %sum2 = add i32 %sum1, %v2
- %sum3 = add i32 %sum2, %v3
- %sum4 = add i32 %sum3, %v4
- %sum5 = add i32 %sum4, %v5
- %sum6 = add i32 %sum5, %v6
- ret i32 %sum5
-}
-
-!0 = !{i32 1}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.nofilter.expected b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.nofilter.expected
deleted file mode 100644
index 26f6b1b..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86-non-temporal.ll.nofilter.expected
+++ /dev/null
@@ -1,61 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s
-
-define i32 @f(<8 x float> %A, i8* %B, <4 x double> %C, <4 x i64> %E, <8 x i32> %F, <16 x i16> %G, <32 x i8> %H, i32* %loadptr) nounwind {
-; CHECK-LABEL: f:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movl (%rsi), %eax
-; CHECK-NEXT: vaddps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
-; CHECK-NEXT: vmovntps %ymm0, (%rdi)
-; CHECK-NEXT: vpaddq {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm2, %ymm0
-; CHECK-NEXT: addl (%rsi), %eax
-; CHECK-NEXT: vmovntdq %ymm0, (%rdi)
-; CHECK-NEXT: vaddpd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm1, %ymm0
-; CHECK-NEXT: addl (%rsi), %eax
-; CHECK-NEXT: vmovntpd %ymm0, (%rdi)
-; CHECK-NEXT: vpaddd {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm3, %ymm0
-; CHECK-NEXT: addl (%rsi), %eax
-; CHECK-NEXT: vmovntdq %ymm0, (%rdi)
-; CHECK-NEXT: vpaddw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm4, %ymm0
-; CHECK-NEXT: addl (%rsi), %eax
-; CHECK-NEXT: vmovntdq %ymm0, (%rdi)
-; CHECK-NEXT: vpaddb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm5, %ymm0
-; CHECK-NEXT: addl (%rsi), %eax
-; CHECK-NEXT: vmovntdq %ymm0, (%rdi)
-; CHECK-NEXT: vzeroupper
-; CHECK-NEXT: retq
- %v0 = load i32, i32* %loadptr, align 1
- %cast = bitcast i8* %B to <8 x float>*
- %A2 = fadd <8 x float> %A, <float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0>
- store <8 x float> %A2, <8 x float>* %cast, align 32, !nontemporal !0
- %v1 = load i32, i32* %loadptr, align 1
- %cast1 = bitcast i8* %B to <4 x i64>*
- %E2 = add <4 x i64> %E, <i64 1, i64 2, i64 3, i64 4>
- store <4 x i64> %E2, <4 x i64>* %cast1, align 32, !nontemporal !0
- %v2 = load i32, i32* %loadptr, align 1
- %cast2 = bitcast i8* %B to <4 x double>*
- %C2 = fadd <4 x double> %C, <double 1.0, double 2.0, double 3.0, double 4.0>
- store <4 x double> %C2, <4 x double>* %cast2, align 32, !nontemporal !0
- %v3 = load i32, i32* %loadptr, align 1
- %cast3 = bitcast i8* %B to <8 x i32>*
- %F2 = add <8 x i32> %F, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
- store <8 x i32> %F2, <8 x i32>* %cast3, align 32, !nontemporal !0
- %v4 = load i32, i32* %loadptr, align 1
- %cast4 = bitcast i8* %B to <16 x i16>*
- %G2 = add <16 x i16> %G, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
- store <16 x i16> %G2, <16 x i16>* %cast4, align 32, !nontemporal !0
- %v5 = load i32, i32* %loadptr, align 1
- %cast5 = bitcast i8* %B to <32 x i8>*
- %H2 = add <32 x i8> %H, <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>
- store <32 x i8> %H2, <32 x i8>* %cast5, align 32, !nontemporal !0
- %v6 = load i32, i32* %loadptr, align 1
- %sum1 = add i32 %v0, %v1
- %sum2 = add i32 %sum1, %v2
- %sum3 = add i32 %sum2, %v3
- %sum4 = add i32 %sum3, %v4
- %sum5 = add i32 %sum4, %v5
- %sum6 = add i32 %sum5, %v6
- ret i32 %sum5
-}
-
-!0 = !{i32 1}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-filter.test b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-filter.test
deleted file mode 100644
index dd7e353..0000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-filter.test
+++ /dev/null
@@ -1,33 +0,0 @@
-# REQUIRES: x86-registered-target
-
-## Check that --filter works properly.
-# RUN: cp -f %S/Inputs/x86-non-temporal.ll %t.ll && %update_llc_test_checks --filter="movnt" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.filter.expected
-
-## Check that running the script again does not change the result:
-# RUN: %update_llc_test_checks --filter="movnt" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.filter.expected
-
-## Check that --filter-out works properly.
-# RUN: cp -f %S/Inputs/x86-non-temporal.ll %t.ll && %update_llc_test_checks --filter-out="movnt" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.filter-out.expected
-
-## Check that running the script again does not change the result:
-# RUN: %update_llc_test_checks --filter-out="movnt" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.filter-out.expected
-
-## Check that multiple filters work properly.
-# RUN: cp -f %S/Inputs/x86-non-temporal.ll %t.ll && %update_llc_test_checks --filter="LCPI[0-9]+_[0-9]+" --filter="movnt" --filter="(%esp|%rsi)" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.multifilter.expected
-
-## Check that running the script again does not change the result:
-# RUN: %update_llc_test_checks --filter="LCPI[0-9]+_[0-9]+" --filter="movnt" --filter="(%esp|%rsi)" %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.multifilter.expected
-
-## Check that no filtering is done.
-# RUN: cp -f %S/Inputs/x86-non-temporal.ll %t.ll && %update_llc_test_checks %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.nofilter.expected
-
-## Check that running the script again does not change the result:
-# RUN: %update_llc_test_checks %t.ll
-# RUN: diff -u %t.ll %S/Inputs/x86-non-temporal.ll.nofilter.expected
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 95d17ba..c24849b 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -456,11 +456,8 @@ def get_run_handler(triple):
##### Generator of assembly CHECK lines
-def add_asm_checks(output_lines, comment_marker, prefix_list, func_dict,
- func_name, is_filtered):
+def add_asm_checks(output_lines, comment_marker, prefix_list, func_dict, func_name):
# Label format is based on ASM string.
check_label_format = '{} %s-LABEL: %s%s:'.format(comment_marker)
global_vars_seen_dict = {}
- common.add_checks(output_lines, comment_marker, prefix_list, func_dict,
- func_name, check_label_format, True, False,
- global_vars_seen_dict, is_filtered = is_filtered)
+ common.add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name, check_label_format, True, False, global_vars_seen_dict)
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index dbcff53..269b429 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1,6 +1,5 @@
from __future__ import print_function
-import argparse
import copy
import glob
import os
@@ -14,99 +13,7 @@ import sys
_verbose = False
_prefix_filecheck_ir_name = ''
-class Regex(object):
- """Wrap a compiled regular expression object to allow deep copy of a regexp.
- This is required for the deep copy done in do_scrub.
-
- """
- def __init__(self, regex):
- self.regex = regex
-
- def __deepcopy__(self, memo):
- result = copy.copy(self)
- result.regex = self.regex
- return result
-
- def search(self, line):
- return self.regex.search(line)
-
- def sub(self, repl, line):
- return self.regex.sub(repl, line)
-
- def pattern(self):
- return self.regex.pattern
-
- def flags(self):
- return self.regex.flags
-
-class Filter(Regex):
- """Augment a Regex object with a flag indicating whether a match should be
- added (!is_filter_out) or removed (is_filter_out) from the generated checks.
-
- """
- def __init__(self, regex, is_filter_out):
- super(Filter, self).__init__(regex)
- self.is_filter_out = is_filter_out
-
- def __deepcopy__(self, memo):
- result = copy.deepcopy(super(Filter, self), memo)
- result.is_filter_out = copy.deepcopy(self.is_filter_out, memo)
- return result
-
def parse_commandline_args(parser):
- class RegexAction(argparse.Action):
- """Add a regular expression option value to a list of regular expressions.
- This compiles the expression, wraps it in a Regex and adds it to the option
- value list."""
- def __init__(self, option_strings, dest, nargs=None, **kwargs):
- if nargs is not None:
- raise ValueError('nargs not allowed')
- super(RegexAction, self).__init__(option_strings, dest, **kwargs)
-
- def do_call(self, namespace, values, flags):
- value_list = getattr(namespace, self.dest)
- if value_list is None:
- value_list = []
-
- try:
- value_list.append(Regex(re.compile(values, flags)))
- except re.error as error:
- raise ValueError('{}: Invalid regular expression \'{}\' ({})'.format(
- option_string, error.pattern, error.msg))
-
- setattr(namespace, self.dest, value_list)
-
- def __call__(self, parser, namespace, values, option_string=None):
- self.do_call(namespace, values, 0)
-
- class FilterAction(RegexAction):
- """Add a filter to a list of filter option values."""
- def __init__(self, option_strings, dest, nargs=None, **kwargs):
- super(FilterAction, self).__init__(option_strings, dest, nargs, **kwargs)
-
- def __call__(self, parser, namespace, values, option_string=None):
- super(FilterAction, self).__call__(parser, namespace, values, option_string)
-
- value_list = getattr(namespace, self.dest)
-
- is_filter_out = ( option_string == '--filter-out' )
-
- value_list[-1] = Filter(value_list[-1].regex, is_filter_out)
-
- setattr(namespace, self.dest, value_list)
-
- filter_group = parser.add_argument_group(
- 'filtering',
- """Filters are applied to each output line according to the order given. The
- first matching filter terminates filter processing for that current line.""")
-
- filter_group.add_argument('--filter', action=FilterAction, dest='filters',
- metavar='REGEX',
- help='Only include lines matching REGEX (may be specified multiple times)')
- filter_group.add_argument('--filter-out', action=FilterAction, dest='filters',
- metavar='REGEX',
- help='Exclude lines matching REGEX')
-
parser.add_argument('--include-generated-funcs', action='store_true',
help='Output checks for functions not in source')
parser.add_argument('-v', '--verbose', action='store_true',
@@ -351,21 +258,6 @@ def find_run_lines(test, lines):
debug(' RUN: {}'.format(l))
return run_lines
-def apply_filters(line, filters):
- has_filter = False
- for f in filters:
- if not f.is_filter_out:
- has_filter = True
- if f.search(line):
- return False if f.is_filter_out else True
- # If we only used filter-out, keep the line, otherwise discard it since no
- # filter matched.
- return False if has_filter else True
-
-def do_filter(body, filters):
- return body if not filters else '\n'.join(filter(
- lambda line: apply_filters(line, filters), body.splitlines()))
-
def scrub_body(body):
# Scrub runs of whitespace out of the assembly, but leave the leading
# whitespace in place.
@@ -428,11 +320,6 @@ class FunctionTestBuilder:
self._verbose = flags.verbose
self._record_args = flags.function_signature
self._check_attributes = flags.check_attributes
- # Strip double-quotes if input was read by UTC_ARGS
- self._filters = list(map(lambda f: Filter(re.compile(f.pattern().strip('"'),
- f.flags()),
- f.is_filter_out),
- flags.filters)) if flags.filters else []
self._scrubber_args = scrubber_args
self._path = path
# Strip double-quotes if input was read by UTC_ARGS
@@ -457,9 +344,6 @@ class FunctionTestBuilder:
def global_var_dict(self):
return self._global_var_dict
- def is_filtered(self):
- return bool(self._filters)
-
def process_run_line(self, function_re, scrubber, raw_tool_output, prefixes, is_asm):
build_global_values_dictionary(self._global_var_dict, raw_tool_output, prefixes)
for m in function_re.finditer(raw_tool_output):
@@ -476,10 +360,9 @@ class FunctionTestBuilder:
args_and_sig = '('
else:
args_and_sig = ''
- filtered_body = do_filter(body, self._filters)
- scrubbed_body = do_scrub(filtered_body, scrubber, self._scrubber_args,
+ scrubbed_body = do_scrub(body, scrubber, self._scrubber_args,
extra=False)
- scrubbed_extra = do_scrub(filtered_body, scrubber, self._scrubber_args,
+ scrubbed_extra = do_scrub(body, scrubber, self._scrubber_args,
extra=True)
if 'analysis' in m.groupdict():
analysis = m.group('analysis')
@@ -766,7 +649,7 @@ def generalize_check_lines(lines, is_analyze, vars_seen, global_vars_seen):
return lines
-def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name, check_label_format, is_asm, is_analyze, global_vars_seen_dict, is_filtered):
+def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name, check_label_format, is_asm, is_analyze, global_vars_seen_dict):
# prefix_exclusions are prefixes we cannot use to print the function because it doesn't exist in run lines that use these prefixes as well.
prefix_exclusions = set()
printed_prefixes = []
@@ -824,26 +707,15 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
else:
output_lines.append(check_label_format % (checkprefix, func_name, args_and_sig))
func_body = str(func_dict[checkprefix][func_name]).splitlines()
- if not func_body:
- # We have filtered everything.
- continue
# For ASM output, just emit the check lines.
if is_asm:
- body_start = 1
- if is_filtered:
- # For filtered output we don't add "-NEXT" so don't add extra spaces
- # before the first line.
- body_start = 0
- else:
- output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0]))
+ output_lines.append('%s %s: %s' % (comment_marker, checkprefix, func_body[0]))
for func_line in func_body[1:]:
if func_line.strip() == '':
output_lines.append('%s %s-EMPTY:' % (comment_marker, checkprefix))
else:
- check_suffix = '-NEXT' if not is_filtered else ''
- output_lines.append('%s %s%s: %s' % (comment_marker, checkprefix,
- check_suffix, func_line))
+ output_lines.append('%s %s-NEXT: %s' % (comment_marker, checkprefix, func_line))
break
# For IR output, change all defs to FileCheck variables, so we're immune
@@ -875,9 +747,8 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
output_lines.append('{} {}: {}'.format(
comment_marker, checkprefix, func_line))
else:
- check_suffix = '-NEXT' if not is_filtered else ''
- output_lines.append('{} {}{}: {}'.format(
- comment_marker, checkprefix, check_suffix, func_line))
+ output_lines.append('{} {}-NEXT: {}'.format(
+ comment_marker, checkprefix, func_line))
is_blank_line = False
# Add space between different check prefixes and also before the first
@@ -891,21 +762,18 @@ def add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
break
def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict,
- func_name, preserve_names, function_sig,
- global_vars_seen_dict, is_filtered):
+ func_name, preserve_names, function_sig, global_vars_seen_dict):
# Label format is based on IR string.
function_def_regex = 'define {{[^@]+}}' if function_sig else ''
check_label_format = '{} %s-LABEL: {}@%s%s'.format(comment_marker, function_def_regex)
add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
- check_label_format, False, preserve_names, global_vars_seen_dict,
- is_filtered)
+ check_label_format, False, preserve_names, global_vars_seen_dict)
def add_analyze_checks(output_lines, comment_marker, prefix_list, func_dict, func_name):
check_label_format = '{} %s-LABEL: \'%s%s\''.format(comment_marker)
global_vars_seen_dict = {}
add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
- check_label_format, False, True, global_vars_seen_dict,
- is_filtered = False)
+ check_label_format, False, True, global_vars_seen_dict)
def build_global_values_dictionary(glob_val_dict, raw_tool_output, prefixes):
for nameless_value in nameless_values:
@@ -1033,21 +901,11 @@ def get_autogennote_suffix(parser, args):
continue
if parser.get_default(action.dest) == value:
continue # Don't add default values
- if action.dest == 'filters':
- # Create a separate option for each filter element. The value is a list
- # of Filter objects.
- for elem in value:
- opt_name = 'filter-out' if elem.is_filter_out else 'filter'
- opt_value = elem.pattern()
- new_arg = '--%s "%s" ' % (opt_name, opt_value.strip('"'))
- if new_arg not in autogenerated_note_args:
- autogenerated_note_args += new_arg
- else:
- autogenerated_note_args += action.option_strings[0] + ' '
- if action.const is None: # action takes a parameter
- if action.nargs == '+':
- value = ' '.join(map(lambda v: '"' + v.strip('"') + '"', value))
- autogenerated_note_args += '%s ' % value
+ autogenerated_note_args += action.option_strings[0] + ' '
+ if action.const is None: # action takes a parameter
+ if action.nargs == '+':
+ value = ' '.join(map(lambda v: '"' + v.strip('"') + '"', value))
+ autogenerated_note_args += '%s ' % value
if autogenerated_note_args:
autogenerated_note_args = ' %s %s' % (UTC_ARGS_KEY, autogenerated_note_args[:-1])
return autogenerated_note_args
diff --git a/llvm/utils/update_cc_test_checks.py b/llvm/utils/update_cc_test_checks.py
index 9e87a72..15318e1 100755
--- a/llvm/utils/update_cc_test_checks.py
+++ b/llvm/utils/update_cc_test_checks.py
@@ -398,8 +398,7 @@ def main():
output_lines.append('//')
added.add(mangled)
common.add_ir_checks(output_lines, '//', filecheck_run_list, func_dict, mangled,
- False, args.function_signature, global_vars_seen_dict,
- is_filtered=builder.is_filtered())
+ False, args.function_signature, global_vars_seen_dict)
if line.rstrip('\n') == '//':
include_line = False
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py
index cf68d23..a9e86ea 100755
--- a/llvm/utils/update_llc_test_checks.py
+++ b/llvm/utils/update_llc_test_checks.py
@@ -111,7 +111,6 @@ def main():
run_list=run_list,
flags=type('', (object,), {
'verbose': ti.args.verbose,
- 'filters': ti.args.filters,
'function_signature': False,
'check_attributes': False,
'replace_value_regex': []}),
@@ -162,8 +161,7 @@ def main():
lambda my_output_lines, prefixes, func:
asm.add_asm_checks(my_output_lines,
check_indent + ';',
- prefixes, func_dict, func,
- is_filtered=builder.is_filtered()))
+ prefixes, func_dict, func))
else:
for input_info in ti.iterlines(output_lines):
input_line = input_info.line
@@ -178,9 +176,7 @@ def main():
continue
# Print out the various check lines here.
- asm.add_asm_checks(output_lines, check_indent + ';', run_list,
- func_dict, func_name,
- is_filtered=builder.is_filtered())
+ asm.add_asm_checks(output_lines, check_indent + ';', run_list, func_dict, func_name)
is_in_function_start = False
if is_in_function:
diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py
index dee3a51..d7fce8d 100755
--- a/llvm/utils/update_test_checks.py
+++ b/llvm/utils/update_test_checks.py
@@ -160,8 +160,7 @@ def main():
prefixes,
func_dict, func, False,
args.function_signature,
- global_vars_seen_dict,
- is_filtered=builder.is_filtered()))
+ global_vars_seen_dict))
else:
# "Normal" mode.
for input_line_info in ti.iterlines(output_lines):
@@ -179,8 +178,7 @@ def main():
# Print out the various check lines here.
common.add_ir_checks(output_lines, ';', prefix_list, func_dict,
func_name, args.preserve_names, args.function_signature,
- global_vars_seen_dict,
- is_filtered=builder.is_filtered())
+ global_vars_seen_dict)
is_in_function_start = False
m = common.IR_FUNCTION_RE.match(input_line)