summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-02-02 23:33:49 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-02-02 23:33:49 +0000
commit2065c94dd32ebdc145a11e0d44067e23dc142f0f (patch)
treed25b44e27380d0f21807e36be2a2fa689e2e040f /llvm/test/CodeGen
parent2491f826794727d6677ec7b2edea7dd9b418c7b0 (diff)
downloadbcm5719-llvm-2065c94dd32ebdc145a11e0d44067e23dc142f0f.tar.gz
bcm5719-llvm-2065c94dd32ebdc145a11e0d44067e23dc142f0f.zip
AMDGPU/GlobalISel: Legalize constant for pointer types
llvm-svn: 352975
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir84
1 files changed, 84 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
index c25f329261d..a38ef998a9e 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-constant.mir
@@ -92,3 +92,87 @@ body: |
%0:_(s128) = G_CONSTANT i128 5
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0
...
+
+---
+name: test_constant_p0
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p0
+ ; CHECK: [[C:%[0-9]+]]:_(p0) = G_CONSTANT i64 0
+ ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p0)
+ %0:_(p0) = G_CONSTANT i64 0
+ $vgpr0_vgpr1 = COPY %0
+...
+
+---
+name: test_constant_p1
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p1
+ ; CHECK: [[C:%[0-9]+]]:_(p1) = G_CONSTANT i64 0
+ ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p1)
+ %0:_(p1) = G_CONSTANT i64 0
+ $vgpr0_vgpr1 = COPY %0
+...
+
+---
+name: test_constant_p2
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p2
+ ; CHECK: [[C:%[0-9]+]]:_(p2) = G_CONSTANT i32 0
+ ; CHECK: $vgpr0 = COPY [[C]](p2)
+ %0:_(p2) = G_CONSTANT i32 0
+ $vgpr0 = COPY %0
+...
+
+---
+name: test_constant_p3
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p3
+ ; CHECK: [[C:%[0-9]+]]:_(p2) = G_CONSTANT i32 0
+ ; CHECK: $vgpr0 = COPY [[C]](p2)
+ %0:_(p2) = G_CONSTANT i32 0
+ $vgpr0 = COPY %0
+...
+
+---
+name: test_constant_p4
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p4
+ ; CHECK: [[C:%[0-9]+]]:_(p4) = G_CONSTANT i64 0
+ ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p4)
+ %0:_(p4) = G_CONSTANT i64 0
+ $vgpr0_vgpr1 = COPY %0
+...
+
+---
+name: test_constant_p5
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p5
+ ; CHECK: [[C:%[0-9]+]]:_(p5) = G_CONSTANT i32 0
+ ; CHECK: $vgpr0 = COPY [[C]](p5)
+ %0:_(p5) = G_CONSTANT i32 0
+ $vgpr0 = COPY %0
+...
+
+---
+name: test_constant_p999
+body: |
+ bb.0:
+
+ ; CHECK-LABEL: name: test_constant_p999
+ ; CHECK: [[C:%[0-9]+]]:_(p999) = G_CONSTANT i64 0
+ ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p999)
+ %0:_(p999) = G_CONSTANT i64 0
+ $vgpr0_vgpr1 = COPY %0
+...
OpenPOWER on IntegriCloud