summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-07-26 09:25:15 +0000
committerDiana Picus <diana.picus@linaro.org>2017-07-26 09:25:15 +0000
commitb1fd7849361f16b9059ddd6956c0f3f2eca784b3 (patch)
tree0080f62a0bfed77d6c48500156577bd4925efc57 /llvm/test
parent6977ec689961d234ce5912319b0e39b74182b82a (diff)
downloadbcm5719-llvm-b1fd7849361f16b9059ddd6956c0f3f2eca784b3.tar.gz
bcm5719-llvm-b1fd7849361f16b9059ddd6956c0f3f2eca784b3.zip
[ARM] GlobalISel: Mark G_GLOBAL_VALUE as legal
llvm-svn: 309090
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir26
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir b/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
index 616f29d3b06..1fb7c79cd24 100644
--- a/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
@@ -47,6 +47,9 @@
define void @test_fadd_s32() #0 { ret void }
define void @test_fadd_s64() #0 { ret void }
+ @a_global = global i32 42
+ define void @test_global_variable() { ret void }
+
attributes #0 = { "target-features"="+vfp2" }
...
---
@@ -948,3 +951,26 @@ body: |
BX_RET 14, _, implicit %d0
...
+---
+name: test_global_variable
+# CHECK-LABEL: name: test_global_variable
+legalized: false
+# CHECK: legalized: true
+regBankSelected: false
+selected: false
+tracksRegLiveness: true
+registers:
+ - { id: 0, class: _ }
+ - { id: 1, class: _ }
+body: |
+ bb.0:
+ liveins: %r0
+
+ %0(s32) = COPY %r0
+ %1(p0) = G_GLOBAL_VALUE @a_global
+ ; G_GLOBAL_VALUE is legal, so we should find it unchanged in the output
+ ; CHECK: {{%[0-9]+}}(p0) = G_GLOBAL_VALUE @a_global
+ %r0 = COPY %1(p0)
+ BX_RET 14, _, implicit %r0
+
+...
OpenPOWER on IntegriCloud