mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
AMDGPU/GlobalISel: Add some tests that used to infinite loop
This commit is contained in:
parent
c7052955c8
commit
bbcd5f4f1b
@ -652,3 +652,18 @@ body: |
|
||||
%2:_(s112) = G_ANYEXT %1
|
||||
S_ENDPGM 0, implicit %2
|
||||
...
|
||||
|
||||
---
|
||||
name: test_anyext_s112_to_s128
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK-LABEL: name: test_anyext_s112_to_s128
|
||||
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY [[COPY]](s128)
|
||||
; CHECK: S_ENDPGM 0, implicit [[COPY1]](s128)
|
||||
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
%1:_(s112) = G_TRUNC %0
|
||||
%2:_(s128) = G_ANYEXT %1
|
||||
S_ENDPGM 0, implicit %2
|
||||
...
|
||||
|
@ -716,3 +716,21 @@ body: |
|
||||
# %2:_(s112) = G_SEXT %1
|
||||
# S_ENDPGM 0, implicit %2
|
||||
# ...
|
||||
|
||||
---
|
||||
name: test_sext_s112_to_s128
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK-LABEL: name: test_sext_s112_to_s128
|
||||
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY [[COPY]](s128)
|
||||
; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](s128)
|
||||
; CHECK: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[UV1]], 48
|
||||
; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[UV]](s64), [[SEXT_INREG]](s64)
|
||||
; CHECK: S_ENDPGM 0, implicit [[MV]](s128)
|
||||
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
%1:_(s112) = G_TRUNC %0
|
||||
%2:_(s128) = G_SEXT %1
|
||||
S_ENDPGM 0, implicit %2
|
||||
...
|
||||
|
@ -716,3 +716,24 @@ body: |
|
||||
%2:_(s112) = G_ZEXT %1
|
||||
S_ENDPGM 0, implicit %2
|
||||
...
|
||||
|
||||
---
|
||||
name: test_zext_s112_to_s128
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK-LABEL: name: test_zext_s112_to_s128
|
||||
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
|
||||
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 281474976710655
|
||||
; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY [[COPY]](s128)
|
||||
; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](s128)
|
||||
; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[UV]], [[C]]
|
||||
; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[UV1]], [[C1]]
|
||||
; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[AND]](s64), [[AND1]](s64)
|
||||
; CHECK: S_ENDPGM 0, implicit [[MV]](s128)
|
||||
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
||||
%1:_(s112) = G_TRUNC %0
|
||||
%2:_(s128) = G_ZEXT %1
|
||||
S_ENDPGM 0, implicit %2
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user