mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
AArch64/GISel: Fix a couple of tests that were testing the wrong thing
Fix a couple of tests that were extending the wrong vreg, and regenerate their checks with update_mir_test_checks. This looks like it was a copy-paste or test update error. llvm-svn: 316087
This commit is contained in:
parent
5d999cddb7
commit
c1e1c469be
@ -1,3 +1,4 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -O0 -run-pass=legalizer -global-isel %s -o - | FileCheck %s
|
||||
|
||||
--- |
|
||||
@ -22,18 +23,22 @@ registers:
|
||||
body: |
|
||||
bb.0.entry:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
; CHECK-LABEL: name: test_scalar_mul_small
|
||||
; CHECK: [[OP0:%.*]](s32) = G_TRUNC %0
|
||||
; CHECK: [[OP1:%.*]](s32) = G_TRUNC %1
|
||||
; CHECK: [[RES32:%.*]](s32) = G_MUL [[OP0]], [[OP1]]
|
||||
; CHECK: [[RES:%.*]](s8) = G_TRUNC [[RES32]](s32)
|
||||
|
||||
; CHECK-LABEL: name: test_scalar_mul_small
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s32) = G_TRUNC [[COPY]](s64)
|
||||
; CHECK: [[TRUNC1:%[0-9]+]](s32) = G_TRUNC [[COPY1]](s64)
|
||||
; CHECK: [[MUL:%[0-9]+]](s32) = G_MUL [[TRUNC]], [[TRUNC1]]
|
||||
; CHECK: [[TRUNC2:%[0-9]+]](s8) = G_TRUNC [[MUL]](s32)
|
||||
; CHECK: [[ANYEXT:%[0-9]+]](s64) = G_ANYEXT [[TRUNC2]](s8)
|
||||
; CHECK: %x0 = COPY [[ANYEXT]](s64)
|
||||
%0(s64) = COPY %x0
|
||||
%1(s64) = COPY %x1
|
||||
%2(s8) = G_TRUNC %0
|
||||
%3(s8) = G_TRUNC %1
|
||||
%4(s8) = G_MUL %2, %3
|
||||
%5(s64) = G_ANYEXT %2
|
||||
%5(s64) = G_ANYEXT %4
|
||||
%x0 = COPY %5
|
||||
...
|
||||
|
||||
@ -44,15 +49,17 @@ body: |
|
||||
bb.0:
|
||||
liveins: %x0, %x1, %w2, %w3
|
||||
|
||||
; CHECK-LABEL: name: test_mul_overflow
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[MUL:%[0-9]+]](s64) = G_MUL [[COPY]], [[COPY1]]
|
||||
; CHECK: [[SMULH:%[0-9]+]](s64) = G_SMULH [[COPY]], [[COPY1]]
|
||||
; CHECK: [[C2:%[0-9]+]](s64) = G_CONSTANT i64 0
|
||||
; CHECK: [[ICMP:%[0-9]+]](s32) = G_ICMP intpred(ne), [[SMULH]](s64), [[C2]]
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s1) = G_TRUNC [[ICMP]](s32)
|
||||
%0:_(s64) = COPY %x0
|
||||
%1:_(s64) = COPY %x1
|
||||
|
||||
; CHECK-LABEL: name: test_mul_overflow
|
||||
; CHECK: %2(s64) = G_MUL %0, %1
|
||||
; CHECK: [[HI:%[0-9]+]](s64) = G_SMULH %0, %1
|
||||
; CHECK: [[ZERO:%[0-9]+]](s64) = G_CONSTANT i64 0
|
||||
; CHECK: [[CMP:%[0-9]+]](s32) = G_ICMP intpred(ne), [[HI]](s64), [[ZERO]]
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s1) = G_TRUNC [[CMP]]
|
||||
%2:_(s64), %3:_(s1) = G_SMULO %0, %1
|
||||
|
||||
...
|
||||
|
@ -1,3 +1,4 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -O0 -mtriple=aarch64-apple-ios -run-pass=legalizer -global-isel %s -o - | FileCheck %s
|
||||
|
||||
---
|
||||
@ -12,18 +13,22 @@ registers:
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
; CHECK-LABEL: name: test_scalar_or_small
|
||||
; CHECK: [[OP0:%.*]](s32) = G_TRUNC %0
|
||||
; CHECK: [[OP1:%.*]](s32) = G_TRUNC %1
|
||||
; CHECK: [[RES32:%.*]](s32) = G_OR [[OP0]], [[OP1]]
|
||||
; CHECK: [[RES:%.*]](s8) = G_TRUNC [[RES32]](s32)
|
||||
|
||||
; CHECK-LABEL: name: test_scalar_or_small
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s32) = G_TRUNC [[COPY]](s64)
|
||||
; CHECK: [[TRUNC1:%[0-9]+]](s32) = G_TRUNC [[COPY1]](s64)
|
||||
; CHECK: [[OR:%[0-9]+]](s32) = G_OR [[TRUNC]], [[TRUNC1]]
|
||||
; CHECK: [[TRUNC2:%[0-9]+]](s8) = G_TRUNC [[OR]](s32)
|
||||
; CHECK: [[ANYEXT:%[0-9]+]](s64) = G_ANYEXT [[TRUNC2]](s8)
|
||||
; CHECK: %x0 = COPY [[ANYEXT]](s64)
|
||||
%0(s64) = COPY %x0
|
||||
%1(s64) = COPY %x1
|
||||
%2(s8) = G_TRUNC %0
|
||||
%3(s8) = G_TRUNC %1
|
||||
%4(s8) = G_OR %2, %3
|
||||
%5(s64) = G_ANYEXT %2
|
||||
%5(s64) = G_ANYEXT %4
|
||||
%x0 = COPY %5
|
||||
...
|
||||
|
||||
@ -42,24 +47,20 @@ registers:
|
||||
body: |
|
||||
bb.0:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
; CHECK-LABEL: name: test_big_scalar_power_of_2
|
||||
; CHECK: [[OP0_0:%.*]](s64) = COPY %x0
|
||||
; CHECK-NEXT: [[OP0_1:%.*]](s64) = COPY %x1
|
||||
; CHECK-NEXT: [[OP1_0:%.*]](s64) = COPY %x2
|
||||
; CHECK-NEXT: [[OP1_1:%.*]](s64) = COPY %x3
|
||||
; CHECK-NEXT: [[RES_0:%.*]](s64) = G_OR [[OP0_0]], [[OP1_0]]
|
||||
; CHECK-NEXT: [[RES_1:%.*]](s64) = G_OR [[OP0_1]], [[OP1_1]]
|
||||
; We have a temporary G_MERGE_VALUES in the legalizer
|
||||
; that gets cleaned up with the G_UNMERGE_VALUES.
|
||||
; Thus,
|
||||
; tmp = G_MERGE_VALUES [[RES_0]], [[RES_1]]
|
||||
; %7, %8 = G_UNMERGE_VALUES tmp
|
||||
; %x0 = COPY %7
|
||||
; %x1 = COPY %8
|
||||
; translates into
|
||||
; CHECK-NEXT: %x0 = COPY [[RES_0]]
|
||||
; CHECK-NEXT: %x1 = COPY [[RES_1]]
|
||||
; We have a temporary G_MERGE_VALUES in the legalizer that gets
|
||||
; cleaned up with the G_UNMERGE_VALUES, so we end up directly
|
||||
; copying the results of the G_OR ops.
|
||||
|
||||
; CHECK-LABEL: name: test_big_scalar_power_of_2
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[COPY2:%[0-9]+]](s64) = COPY %x2
|
||||
; CHECK: [[COPY3:%[0-9]+]](s64) = COPY %x3
|
||||
; CHECK: [[OR:%[0-9]+]](s64) = G_OR [[COPY]], [[COPY2]]
|
||||
; CHECK: [[OR1:%[0-9]+]](s64) = G_OR [[COPY1]], [[COPY3]]
|
||||
; CHECK: %x0 = COPY [[OR]](s64)
|
||||
; CHECK: %x1 = COPY [[OR1]](s64)
|
||||
; CHECK: RET_ReallyLR implicit %x0, implicit %x1
|
||||
%0(s64) = COPY %x0
|
||||
%1(s64) = COPY %x1
|
||||
%2(s64) = COPY %x2
|
||||
|
@ -1,3 +1,4 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -O0 -run-pass=legalizer -global-isel %s -o - | FileCheck %s
|
||||
|
||||
--- |
|
||||
@ -21,17 +22,21 @@ registers:
|
||||
body: |
|
||||
bb.0.entry:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
; CHECK-LABEL: name: test_scalar_sub_small
|
||||
; CHECK: [[OP0:%.*]](s32) = G_TRUNC %0
|
||||
; CHECK: [[OP1:%.*]](s32) = G_TRUNC %1
|
||||
; CHECK: [[RES32:%.*]](s32) = G_SUB [[OP0]], [[OP1]]
|
||||
; CHECK: [[RES:%.*]](s8) = G_TRUNC [[RES32]](s32)
|
||||
|
||||
; CHECK-LABEL: name: test_scalar_sub_small
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s32) = G_TRUNC [[COPY]](s64)
|
||||
; CHECK: [[TRUNC1:%[0-9]+]](s32) = G_TRUNC [[COPY1]](s64)
|
||||
; CHECK: [[SUB:%[0-9]+]](s32) = G_SUB [[TRUNC]], [[TRUNC1]]
|
||||
; CHECK: [[TRUNC2:%[0-9]+]](s8) = G_TRUNC [[SUB]](s32)
|
||||
; CHECK: [[ANYEXT:%[0-9]+]](s64) = G_ANYEXT [[TRUNC2]](s8)
|
||||
; CHECK: %x0 = COPY [[ANYEXT]](s64)
|
||||
%0(s64) = COPY %x0
|
||||
%1(s64) = COPY %x1
|
||||
%2(s8) = G_TRUNC %0
|
||||
%3(s8) = G_TRUNC %1
|
||||
%4(s8) = G_SUB %2, %3
|
||||
%5(s64) = G_ANYEXT %2
|
||||
%5(s64) = G_ANYEXT %4
|
||||
%x0 = COPY %5
|
||||
...
|
||||
|
@ -1,3 +1,4 @@
|
||||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
||||
# RUN: llc -O0 -run-pass=legalizer -global-isel %s -o - | FileCheck %s
|
||||
|
||||
--- |
|
||||
@ -21,17 +22,21 @@ registers:
|
||||
body: |
|
||||
bb.0.entry:
|
||||
liveins: %x0, %x1, %x2, %x3
|
||||
; CHECK-LABEL: name: test_scalar_xor_small
|
||||
; CHECK: [[OP0:%.*]](s32) = G_TRUNC %0
|
||||
; CHECK: [[OP1:%.*]](s32) = G_TRUNC %1
|
||||
; CHECK: [[RES32:%.*]](s32) = G_XOR [[OP0]], [[OP1]]
|
||||
; CHECK: [[RES:%.*]](s8) = G_TRUNC [[RES32]](s32)
|
||||
|
||||
; CHECK-LABEL: name: test_scalar_xor_small
|
||||
; CHECK: [[COPY:%[0-9]+]](s64) = COPY %x0
|
||||
; CHECK: [[COPY1:%[0-9]+]](s64) = COPY %x1
|
||||
; CHECK: [[TRUNC:%[0-9]+]](s32) = G_TRUNC [[COPY]](s64)
|
||||
; CHECK: [[TRUNC1:%[0-9]+]](s32) = G_TRUNC [[COPY1]](s64)
|
||||
; CHECK: [[XOR:%[0-9]+]](s32) = G_XOR [[TRUNC]], [[TRUNC1]]
|
||||
; CHECK: [[TRUNC2:%[0-9]+]](s8) = G_TRUNC [[XOR]](s32)
|
||||
; CHECK: [[ANYEXT:%[0-9]+]](s64) = G_ANYEXT [[TRUNC2]](s8)
|
||||
; CHECK: %x0 = COPY [[ANYEXT]](s64)
|
||||
%0(s64) = COPY %x0
|
||||
%1(s64) = COPY %x1
|
||||
%2(s8) = G_TRUNC %0
|
||||
%3(s8) = G_TRUNC %1
|
||||
%4(s8) = G_XOR %2, %3
|
||||
%5(s64) = G_ANYEXT %2
|
||||
%5(s64) = G_ANYEXT %4
|
||||
%x0 = COPY %5
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user