Skip to content

Commit 619b210

Browse files
committed
[AIEX] s24 load/trunc unitttest
1 parent 7f68bce commit 619b210

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

llvm/test/CodeGen/AIE/GlobalISel/combine-trunc-to-s20.mir

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,23 @@ body: |
306306
307307
...
308308

309+
---
310+
name: G_LOAD_with_G_INTTOPTR_use
311+
legalized: false
312+
body: |
313+
bb.1:
314+
liveins: $p0
315+
; CHECK-LABEL: name: G_LOAD_with_G_INTTOPTR_use
316+
; CHECK: liveins: $p0
317+
; CHECK-NEXT: {{ $}}
318+
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $p0
319+
; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s24) = G_LOAD [[COPY]](p0) :: (dereferenceable load (s24), align 4)
320+
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s20) = G_TRUNC [[LOAD]](s24)
321+
; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[TRUNC]](s20)
322+
; CHECK-NEXT: $p0 = COPY [[INTTOPTR]](p0)
323+
%0:_(p0) = COPY $p0
324+
%1:_(s24) = G_LOAD %0:_(p0) :: (dereferenceable load (s24), align 4)
325+
%2:_(s20) = G_TRUNC %1
326+
%3:_(p0) = G_INTTOPTR %2
327+
$p0 = COPY %3
328+
...

0 commit comments

Comments
 (0)