summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-07-26 21:49:34 +0000
committerMatthias Braun <matze@braunis.de>2016-07-26 21:49:34 +0000
commit333e468d15dd0b41de1c1e490693a5fd9d4d62df (patch)
tree5a354127a5a567a7ff5cf898e8d6e7d394c9d9fe /llvm/test
parent9fab64643dfce6481c5a4897b8b2238cf4e6a7cc (diff)
downloadbcm5719-llvm-333e468d15dd0b41de1c1e490693a5fd9d4d62df.tar.gz
bcm5719-llvm-333e468d15dd0b41de1c1e490693a5fd9d4d62df.zip
MIRParser: Use dot instead of colon to mark subregisters
Change the syntax to use `%0.sub8` to denote a subregister. This seems like a more natural fit to denote subregisters; I also plan to introduce a new ":classname" syntax in upcoming patches to denote the register class of a vreg. Note that this commit disallows plain identifiers to start with a '.' character. This shouldn't affect anything as external names/IR references are all prefixed with '$'/'%', plain identifiers are only used for instruction names, register mask names and subreg indexes. Differential Revision: https://reviews.llvm.org/D22390 llvm-svn: 276815
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AMDGPU/detect-dead-lanes.mir138
-rw-r--r--llvm/test/CodeGen/AMDGPU/liveness.mir8
-rw-r--r--llvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir24
-rw-r--r--llvm/test/CodeGen/MIR/X86/expected-subregister-after-colon.mir4
-rw-r--r--llvm/test/CodeGen/MIR/X86/subreg-on-physreg.mir2
-rw-r--r--llvm/test/CodeGen/MIR/X86/subregister-operands.mir4
-rw-r--r--llvm/test/CodeGen/MIR/X86/unknown-subregister-index.mir2
7 files changed, 91 insertions, 91 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/detect-dead-lanes.mir b/llvm/test/CodeGen/AMDGPU/detect-dead-lanes.mir
index f7f953c144d..9f776e0e572 100644
--- a/llvm/test/CodeGen/AMDGPU/detect-dead-lanes.mir
+++ b/llvm/test/CodeGen/AMDGPU/detect-dead-lanes.mir
@@ -17,14 +17,14 @@
# CHECK: S_NOP 0, implicit-def %1
# CHECK: S_NOP 0, implicit-def dead %2
# CHECK: %3 = REG_SEQUENCE %0, {{[0-9]+}}, %1, {{[0-9]+}}, undef %2, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %3:sub0
-# CHECK: S_NOP 0, implicit %3:sub1
-# CHECK: S_NOP 0, implicit undef %3:sub2
-# CHECK: %4 = COPY %3:sub0_sub1
-# CHECK: %5 = COPY undef %3:sub2_sub3
-# CHECK: S_NOP 0, implicit %4:sub0
-# CHECK: S_NOP 0, implicit %4:sub1
-# CHECK: S_NOP 0, implicit undef %5:sub0
+# CHECK: S_NOP 0, implicit %3.sub0
+# CHECK: S_NOP 0, implicit %3.sub1
+# CHECK: S_NOP 0, implicit undef %3.sub2
+# CHECK: %4 = COPY %3.sub0_sub1
+# CHECK: %5 = COPY undef %3.sub2_sub3
+# CHECK: S_NOP 0, implicit %4.sub0
+# CHECK: S_NOP 0, implicit %4.sub1
+# CHECK: S_NOP 0, implicit undef %5.sub0
name: test0
isSSA: true
registers:
@@ -40,14 +40,14 @@ body: |
S_NOP 0, implicit-def %1
S_NOP 0, implicit-def %2
%3 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1, %2, %subreg.sub3
- S_NOP 0, implicit %3:sub0
- S_NOP 0, implicit %3:sub1
- S_NOP 0, implicit %3:sub2
- %4 = COPY %3:sub0_sub1
- %5 = COPY %3:sub2_sub3
- S_NOP 0, implicit %4:sub0
- S_NOP 0, implicit %4:sub1
- S_NOP 0, implicit %5:sub0
+ S_NOP 0, implicit %3.sub0
+ S_NOP 0, implicit %3.sub1
+ S_NOP 0, implicit %3.sub2
+ %4 = COPY %3.sub0_sub1
+ %5 = COPY %3.sub2_sub3
+ S_NOP 0, implicit %4.sub0
+ S_NOP 0, implicit %4.sub1
+ S_NOP 0, implicit %5.sub0
...
---
# Check defined lanes transfer; Includes checking for some special cases like
@@ -55,20 +55,20 @@ body: |
# CHECK-LABEL: name: test1
# CHECK: %0 = REG_SEQUENCE %sgpr0, {{[0-9]+}}, %sgpr0, {{[0-9]+}}
# CHECK: %1 = INSERT_SUBREG %0, %sgpr1, {{[0-9]+}}
-# CHECK: %2 = INSERT_SUBREG %0:sub2_sub3, %sgpr42, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %1:sub0
-# CHECK: S_NOP 0, implicit undef %1:sub1
-# CHECK: S_NOP 0, implicit %1:sub2
-# CHECK: S_NOP 0, implicit %1:sub3
-# CHECK: S_NOP 0, implicit %2:sub0
-# CHECK: S_NOP 0, implicit undef %2:sub1
+# CHECK: %2 = INSERT_SUBREG %0.sub2_sub3, %sgpr42, {{[0-9]+}}
+# CHECK: S_NOP 0, implicit %1.sub0
+# CHECK: S_NOP 0, implicit undef %1.sub1
+# CHECK: S_NOP 0, implicit %1.sub2
+# CHECK: S_NOP 0, implicit %1.sub3
+# CHECK: S_NOP 0, implicit %2.sub0
+# CHECK: S_NOP 0, implicit undef %2.sub1
# CHECK: %3 = IMPLICIT_DEF
# CHECK: %4 = INSERT_SUBREG %0, undef %3, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit undef %4:sub0
-# CHECK: S_NOP 0, implicit undef %4:sub1
-# CHECK: S_NOP 0, implicit %4:sub2
-# CHECK: S_NOP 0, implicit undef %4:sub3
+# CHECK: S_NOP 0, implicit undef %4.sub0
+# CHECK: S_NOP 0, implicit undef %4.sub1
+# CHECK: S_NOP 0, implicit %4.sub2
+# CHECK: S_NOP 0, implicit undef %4.sub3
# CHECK: %5 = EXTRACT_SUBREG %0, {{[0-9]+}}
# CHECK: %6 = EXTRACT_SUBREG %5, {{[0-9]+}}
@@ -101,20 +101,20 @@ body: |
bb.0:
%0 = REG_SEQUENCE %sgpr0, %subreg.sub0, %sgpr0, %subreg.sub2
%1 = INSERT_SUBREG %0, %sgpr1, %subreg.sub3
- %2 = INSERT_SUBREG %0:sub2_sub3, %sgpr42, %subreg.sub0
- S_NOP 0, implicit %1:sub0
- S_NOP 0, implicit %1:sub1
- S_NOP 0, implicit %1:sub2
- S_NOP 0, implicit %1:sub3
- S_NOP 0, implicit %2:sub0
- S_NOP 0, implicit %2:sub1
+ %2 = INSERT_SUBREG %0.sub2_sub3, %sgpr42, %subreg.sub0
+ S_NOP 0, implicit %1.sub0
+ S_NOP 0, implicit %1.sub1
+ S_NOP 0, implicit %1.sub2
+ S_NOP 0, implicit %1.sub3
+ S_NOP 0, implicit %2.sub0
+ S_NOP 0, implicit %2.sub1
%3 = IMPLICIT_DEF
%4 = INSERT_SUBREG %0, %3, %subreg.sub0
- S_NOP 0, implicit %4:sub0
- S_NOP 0, implicit %4:sub1
- S_NOP 0, implicit %4:sub2
- S_NOP 0, implicit %4:sub3
+ S_NOP 0, implicit %4.sub0
+ S_NOP 0, implicit %4.sub1
+ S_NOP 0, implicit %4.sub2
+ S_NOP 0, implicit %4.sub3
%5 = EXTRACT_SUBREG %0, %subreg.sub0_sub1
%6 = EXTRACT_SUBREG %5, %subreg.sub0
@@ -138,8 +138,8 @@ body: |
# CHECK: S_NOP 0, implicit-def %1
# CHECK: S_NOP 0, implicit-def %2
# CHECK: %3 = REG_SEQUENCE undef %0, {{[0-9]+}}, %1, {{[0-9]+}}, %2, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %3:sub1
-# CHECK: S_NOP 0, implicit %3:sub3
+# CHECK: S_NOP 0, implicit %3.sub1
+# CHECK: S_NOP 0, implicit %3.sub3
# CHECK: S_NOP 0, implicit-def %4
# CHECK: S_NOP 0, implicit-def dead %5
@@ -149,18 +149,18 @@ body: |
# CHECK: S_NOP 0, implicit-def dead %7
# CHECK: S_NOP 0, implicit-def %8
# CHECK: %9 = INSERT_SUBREG undef %7, %8, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %9:sub2
+# CHECK: S_NOP 0, implicit %9.sub2
# CHECK: S_NOP 0, implicit-def %10
# CHECK: S_NOP 0, implicit-def dead %11
# CHECK: %12 = INSERT_SUBREG %10, undef %11, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %12:sub3
+# CHECK: S_NOP 0, implicit %12.sub3
# CHECK: S_NOP 0, implicit-def %13
# CHECK: S_NOP 0, implicit-def dead %14
# CHECK: %15 = REG_SEQUENCE %13, {{[0-9]+}}, undef %14, {{[0-9]+}}
# CHECK: %16 = EXTRACT_SUBREG %15, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %16:sub1
+# CHECK: S_NOP 0, implicit %16.sub1
name: test2
isSSA: true
@@ -188,8 +188,8 @@ body: |
S_NOP 0, implicit-def %1
S_NOP 0, implicit-def %2
%3 = REG_SEQUENCE %0, %subreg.sub0, %1, %subreg.sub1, %2, %subreg.sub2_sub3
- S_NOP 0, implicit %3:sub1
- S_NOP 0, implicit %3:sub3
+ S_NOP 0, implicit %3.sub1
+ S_NOP 0, implicit %3.sub3
S_NOP 0, implicit-def %4
S_NOP 0, implicit-def %5
@@ -199,18 +199,18 @@ body: |
S_NOP 0, implicit-def %7
S_NOP 0, implicit-def %8
%9 = INSERT_SUBREG %7, %8, %subreg.sub2_sub3
- S_NOP 0, implicit %9:sub2
+ S_NOP 0, implicit %9.sub2
S_NOP 0, implicit-def %10
S_NOP 0, implicit-def %11
%12 = INSERT_SUBREG %10, %11, %subreg.sub0_sub1
- S_NOP 0, implicit %12:sub3
+ S_NOP 0, implicit %12.sub3
S_NOP 0, implicit-def %13
S_NOP 0, implicit-def %14
%15 = REG_SEQUENCE %13, %subreg.sub0_sub1, %14, %subreg.sub2_sub3
%16 = EXTRACT_SUBREG %15, %subreg.sub0_sub1
- S_NOP 0, implicit %16:sub1
+ S_NOP 0, implicit %16.sub1
...
---
# Check that copies to physregs use all lanes, copies from physregs define all
@@ -261,7 +261,7 @@ body: |
# CHECK-LABEL: name: test5
# CHECK: S_NOP 0, implicit-def %0
# CHECK: %1 = REG_SEQUENCE undef %0, {{[0-9]+}}, %0, {{[0-9]+}}
-# CHECK: S_NOP 0, implicit %1:sub1
+# CHECK: S_NOP 0, implicit %1.sub1
name: test5
isSSA: true
tracksRegLiveness: true
@@ -272,7 +272,7 @@ body: |
bb.0:
S_NOP 0, implicit-def %0
%1 = REG_SEQUENCE %0, %subreg.sub0, %0, %subreg.sub1
- S_NOP 0, implicit %1:sub1
+ S_NOP 0, implicit %1.sub1
...
---
# Check "optimistic" dataflow fixpoint in phi-loops.
@@ -287,8 +287,8 @@ body: |
# CHECK: %4 = PHI %3, %bb.0, %5, %bb.1
# CHECK: bb.2:
-# CHECK: S_NOP 0, implicit %4:sub0
-# CHECK: S_NOP 0, implicit undef %4:sub3
+# CHECK: S_NOP 0, implicit %4.sub0
+# CHECK: S_NOP 0, implicit undef %4.sub3
name: loop0
isSSA: true
tracksRegLiveness: true
@@ -313,14 +313,14 @@ body: |
%4 = PHI %3, %bb.0, %5, %bb.1
; let's swiffle some lanes around for fun...
- %5 = REG_SEQUENCE %4:sub0, %subreg.sub0, %4:sub2, %subreg.sub1, %4:sub1, %subreg.sub2, %4:sub3, %subreg.sub3
+ %5 = REG_SEQUENCE %4.sub0, %subreg.sub0, %4.sub2, %subreg.sub1, %4.sub1, %subreg.sub2, %4.sub3, %subreg.sub3
S_CBRANCH_VCCNZ %bb.1, implicit undef %vcc
S_BRANCH %bb.2
bb.2:
- S_NOP 0, implicit %4:sub0
- S_NOP 0, implicit %4:sub3
+ S_NOP 0, implicit %4.sub0
+ S_NOP 0, implicit %4.sub3
...
---
# Check a loop that needs to be traversed multiple times to reach the fixpoint
@@ -339,10 +339,10 @@ body: |
# CHECK: bb.1:
# CHECK: %5 = PHI %4, %bb.0, %6, %bb.1
-# CHECK: %6 = REG_SEQUENCE %5:sub1, {{[0-9]+}}, %5:sub3, {{[0-9]+}}, undef %5:sub2, {{[0-9]+}}, %5:sub0, {{[0-9]+}}
+# CHECK: %6 = REG_SEQUENCE %5.sub1, {{[0-9]+}}, %5.sub3, {{[0-9]+}}, undef %5.sub2, {{[0-9]+}}, %5.sub0, {{[0-9]+}}
# CHECK: bb.2:
-# CHECK: S_NOP 0, implicit %6:sub3
+# CHECK: S_NOP 0, implicit %6.sub3
name: loop1
isSSA: true
tracksRegLiveness: true
@@ -369,13 +369,13 @@ body: |
%5 = PHI %4, %bb.0, %6, %bb.1
; rotate lanes, but skip sub2 lane...
- %6 = REG_SEQUENCE %5:sub1, %subreg.sub0, %5:sub3, %subreg.sub1, %5:sub2, %subreg.sub2, %5:sub0, %subreg.sub3
+ %6 = REG_SEQUENCE %5.sub1, %subreg.sub0, %5.sub3, %subreg.sub1, %5.sub2, %subreg.sub2, %5.sub0, %subreg.sub3
S_CBRANCH_VCCNZ %bb.1, implicit undef %vcc
S_BRANCH %bb.2
bb.2:
- S_NOP 0, implicit %6:sub3
+ S_NOP 0, implicit %6.sub3
...
---
# Similar to loop1 test, but check for fixpoint of defined lanes.
@@ -388,13 +388,13 @@ body: |
# CHECK: bb.1:
# CHECK: %2 = PHI %1, %bb.0, %3, %bb.1
-# CHECK: %3 = REG_SEQUENCE %2:sub3, {{[0-9]+}}, undef %2:sub1, {{[0-9]+}}, %2:sub0, {{[0-9]+}}, %2:sub2, {{[0-9]+}}
+# CHECK: %3 = REG_SEQUENCE %2.sub3, {{[0-9]+}}, undef %2.sub1, {{[0-9]+}}, %2.sub0, {{[0-9]+}}, %2.sub2, {{[0-9]+}}
# CHECK: bb.2:
-# CHECK: S_NOP 0, implicit %2:sub0
-# CHECK: S_NOP 0, implicit undef %2:sub1
-# CHECK: S_NOP 0, implicit %2:sub2
-# CHECK: S_NOP 0, implicit %2:sub3
+# CHECK: S_NOP 0, implicit %2.sub0
+# CHECK: S_NOP 0, implicit undef %2.sub1
+# CHECK: S_NOP 0, implicit %2.sub2
+# CHECK: S_NOP 0, implicit %2.sub3
name: loop2
isSSA: true
tracksRegLiveness: true
@@ -415,14 +415,14 @@ body: |
%2 = PHI %1, %bb.0, %3, %bb.1
; rotate subreg lanes, skipping sub1
- %3 = REG_SEQUENCE %2:sub3, %subreg.sub0, %2:sub1, %subreg.sub1, %2:sub0, %subreg.sub2, %2:sub2, %subreg.sub3
+ %3 = REG_SEQUENCE %2.sub3, %subreg.sub0, %2.sub1, %subreg.sub1, %2.sub0, %subreg.sub2, %2.sub2, %subreg.sub3
S_CBRANCH_VCCNZ %bb.1, implicit undef %vcc
S_BRANCH %bb.2
bb.2:
- S_NOP 0, implicit %2:sub0
- S_NOP 0, implicit undef %2:sub1
- S_NOP 0, implicit %2:sub2
- S_NOP 0, implicit %2:sub3
+ S_NOP 0, implicit %2.sub0
+ S_NOP 0, implicit undef %2.sub1
+ S_NOP 0, implicit %2.sub2
+ S_NOP 0, implicit %2.sub3
...
diff --git a/llvm/test/CodeGen/AMDGPU/liveness.mir b/llvm/test/CodeGen/AMDGPU/liveness.mir
index ce49294d5b3..112c3f8e69a 100644
--- a/llvm/test/CodeGen/AMDGPU/liveness.mir
+++ b/llvm/test/CodeGen/AMDGPU/liveness.mir
@@ -17,16 +17,16 @@ registers:
body: |
bb.0:
successors: %bb.1, %bb.2
- S_NOP 0, implicit-def undef %0:sub0
+ S_NOP 0, implicit-def undef %0.sub0
S_CBRANCH_VCCNZ %bb.1, implicit undef %vcc
S_BRANCH %bb.2
bb.1:
successors: %bb.2
- S_NOP 0, implicit-def %0:sub1
- S_NOP 0, implicit %0:sub1
+ S_NOP 0, implicit-def %0.sub1
+ S_NOP 0, implicit %0.sub1
S_BRANCH %bb.2
bb.2:
- S_NOP 0, implicit %0:sub0
+ S_NOP 0, implicit %0.sub0
...
diff --git a/llvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir b/llvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir
index 2dd21ca51e4..cbca32331f7 100644
--- a/llvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir
+++ b/llvm/test/CodeGen/AMDGPU/rename-independent-subregs.mir
@@ -7,12 +7,12 @@
# can be moved to a new virtual register. The third def of sub1 however is used
# in combination with sub0 and needs to stay with the original vreg.
# CHECK-LABEL: name: test0
-# CHECK: S_NOP 0, implicit-def undef %0:sub0
-# CHECK: S_NOP 0, implicit-def undef %2:sub1
-# CHECK: S_NOP 0, implicit %2:sub1
-# CHECK: S_NOP 0, implicit-def undef %1:sub1
-# CHECK: S_NOP 0, implicit %1:sub1
-# CHECK: S_NOP 0, implicit-def %0:sub1
+# CHECK: S_NOP 0, implicit-def undef %0.sub0
+# CHECK: S_NOP 0, implicit-def undef %2.sub1
+# CHECK: S_NOP 0, implicit %2.sub1
+# CHECK: S_NOP 0, implicit-def undef %1.sub1
+# CHECK: S_NOP 0, implicit %1.sub1
+# CHECK: S_NOP 0, implicit-def %0.sub1
# CHECK: S_NOP 0, implicit %0
name: test0
isSSA: true
@@ -20,11 +20,11 @@ registers:
- { id: 0, class: sreg_128 }
body: |
bb.0:
- S_NOP 0, implicit-def undef %0:sub0
- S_NOP 0, implicit-def %0:sub1
- S_NOP 0, implicit %0:sub1
- S_NOP 0, implicit-def %0:sub1
- S_NOP 0, implicit %0:sub1
- S_NOP 0, implicit-def %0:sub1
+ S_NOP 0, implicit-def undef %0.sub0
+ S_NOP 0, implicit-def %0.sub1
+ S_NOP 0, implicit %0.sub1
+ S_NOP 0, implicit-def %0.sub1
+ S_NOP 0, implicit %0.sub1
+ S_NOP 0, implicit-def %0.sub1
S_NOP 0, implicit %0
...
diff --git a/llvm/test/CodeGen/MIR/X86/expected-subregister-after-colon.mir b/llvm/test/CodeGen/MIR/X86/expected-subregister-after-colon.mir
index d1d62461d37..5796c18eced 100644
--- a/llvm/test/CodeGen/MIR/X86/expected-subregister-after-colon.mir
+++ b/llvm/test/CodeGen/MIR/X86/expected-subregister-after-colon.mir
@@ -19,8 +19,8 @@ registers:
body: |
bb.0.entry:
%0 = COPY %edi
- ; CHECK: [[@LINE+1]]:20: expected a subregister index after ':'
- %1 = COPY %0 : 42
+ ; CHECK: [[@LINE+1]]:20: expected a subregister index after '.'
+ %1 = COPY %0 . 42
%2 = AND8ri %1, 1, implicit-def %eflags
%al = COPY %2
RETQ %al
diff --git a/llvm/test/CodeGen/MIR/X86/subreg-on-physreg.mir b/llvm/test/CodeGen/MIR/X86/subreg-on-physreg.mir
index f20195e7ddf..740d706433f 100644
--- a/llvm/test/CodeGen/MIR/X86/subreg-on-physreg.mir
+++ b/llvm/test/CodeGen/MIR/X86/subreg-on-physreg.mir
@@ -8,5 +8,5 @@ name: t
body: |
bb.0:
; CHECK: [[@LINE+1]]:19: subregister index expects a virtual register
- %eax:sub_8bit = COPY %bl
+ %eax.sub_8bit = COPY %bl
...
diff --git a/llvm/test/CodeGen/MIR/X86/subregister-operands.mir b/llvm/test/CodeGen/MIR/X86/subregister-operands.mir
index a02bfe8359d..a69fe087b0d 100644
--- a/llvm/test/CodeGen/MIR/X86/subregister-operands.mir
+++ b/llvm/test/CodeGen/MIR/X86/subregister-operands.mir
@@ -22,9 +22,9 @@ body: |
bb.0.entry:
liveins: %edi
; CHECK: %0 = COPY %edi
- ; CHECK-NEXT: %1 = COPY %0:sub_8bit
+ ; CHECK-NEXT: %1 = COPY %0.sub_8bit
%0 = COPY %edi
- %1 = COPY %0:sub_8bit
+ %1 = COPY %0.sub_8bit
%2 = AND8ri %1, 1, implicit-def %eflags
%al = COPY %2
RETQ %al
diff --git a/llvm/test/CodeGen/MIR/X86/unknown-subregister-index.mir b/llvm/test/CodeGen/MIR/X86/unknown-subregister-index.mir
index 6ad6242f79a..2751bc25174 100644
--- a/llvm/test/CodeGen/MIR/X86/unknown-subregister-index.mir
+++ b/llvm/test/CodeGen/MIR/X86/unknown-subregister-index.mir
@@ -22,7 +22,7 @@ body: |
bb.0.entry:
%0 = COPY %edi
; CHECK: [[@LINE+1]]:18: use of unknown subregister index 'bit8'
- %1 = COPY %0:bit8
+ %1 = COPY %0.bit8
%2 = AND8ri %1, 1, implicit-def %eflags
%al = COPY %2
RETQ %al
OpenPOWER on IntegriCloud