summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2018-01-10 09:32:01 +0000
committerDiana Picus <diana.picus@linaro.org>2018-01-10 09:32:01 +0000
commit734a5e8912b885c81d480afa3d33acb2636519a9 (patch)
tree8e9fdf21fdf2c0ed168bcccef59b836175da6b46 /llvm/test/CodeGen/ARM
parentd9dde1ac56ceb00c1b1d74707a710871b4c2be32 (diff)
downloadbcm5719-llvm-734a5e8912b885c81d480afa3d33acb2636519a9.tar.gz
bcm5719-llvm-734a5e8912b885c81d480afa3d33acb2636519a9.zip
[ARM GlobalISel] Legalize G_CONSTANT for scalars > 32 bits
Make G_CONSTANT narrow for any scalars larger than 32 bits. llvm-svn: 322162
Diffstat (limited to 'llvm/test/CodeGen/ARM')
-rw-r--r--llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir b/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
index e3c9839682a..d88f48c2654 100644
--- a/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
+++ b/llvm/test/CodeGen/ARM/GlobalISel/arm-legalizer.mir
@@ -879,6 +879,9 @@ registers:
- { id: 3, class: _ }
- { id: 4, class: _ }
- { id: 5, class: _ }
+ - { id: 6, class: _ }
+ - { id: 7, class: _ }
+ - { id: 8, class: _ }
body: |
bb.0:
liveins: %r0
@@ -913,6 +916,14 @@ body: |
G_STORE %5(p0), %4(p0) :: (store 4)
; CHECK: {{%[0-9]+}}:_(p0) = G_CONSTANT 0
+ %6(s64) = G_CONSTANT i64 17179869200 ; = 4 * 2 ^ 32 + 16
+ %7(s32), %8(s32) = G_UNMERGE_VALUES %6(s64)
+ G_STORE %7(s32), %4(p0) :: (store 4)
+ G_STORE %8(s32), %4(p0) :: (store 4)
+ ; CHECK-DAG: {{%[0-9]+}}:_(s32) = G_CONSTANT i32 4
+ ; CHECK-DAG: {{%[0-9]+}}:_(s32) = G_CONSTANT i32 16
+ ; CHECK-NOT: G_CONSTANT i64
+
%r0 = COPY %0(s32)
BX_RET 14, %noreg, implicit %r0
...
OpenPOWER on IntegriCloud