const LLT s32 = LLT::scalar(32);
const LLT s64 = LLT::scalar(64);
+ setAction({G_GLOBAL_VALUE, p0}, Legal);
setAction({G_FRAME_INDEX, p0}, Legal);
for (unsigned Op : {G_LOAD, G_STORE}) {
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" }
...
---
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
+
+...