forked from OSchip/llvm-project
182 lines
6.0 KiB
YAML
182 lines
6.0 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s
|
|
|
|
---
|
|
name: test_select_s32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_s32
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
|
|
; CHECK: $vgpr0 = COPY [[SELECT]](s32)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(s32) = G_CONSTANT i32 1
|
|
%4:_(s32) = G_CONSTANT i32 2
|
|
%5:_(s32) = G_SELECT %2, %3, %4
|
|
$vgpr0 = COPY %5
|
|
|
|
...
|
|
|
|
---
|
|
name: test_select_s64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_s64
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](s64)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(s64) = G_CONSTANT i64 1
|
|
%4:_(s64) = G_CONSTANT i64 2
|
|
%5:_(s64) = G_SELECT %2, %3, %4
|
|
$vgpr0_vgpr1 = COPY %5
|
|
|
|
...
|
|
|
|
---
|
|
name: test_select_v2s32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_v2s32
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(<2 x s32>) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(<2 x s32>) = G_CONSTANT i32 2
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(<2 x s32>) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[SELECT]](<2 x s32>)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(<2 x s32>) = G_CONSTANT i32 1
|
|
%4:_(<2 x s32>) = G_CONSTANT i32 2
|
|
%5:_(<2 x s32>) = G_SELECT %2, %3, %4
|
|
$vgpr0_vgpr1 = COPY %5
|
|
|
|
...
|
|
|
|
---
|
|
name: test_select_s16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_s16
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[SELECT]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(s16) = G_CONSTANT i16 1
|
|
%4:_(s16) = G_CONSTANT i16 2
|
|
%5:_(s16) = G_SELECT %2, %3, %4
|
|
%6:_(s32) = G_ANYEXT %5
|
|
$vgpr0 = COPY %6
|
|
|
|
...
|
|
|
|
---
|
|
name: test_select_s8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_s8
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[SELECT]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(s8) = G_CONSTANT i16 1
|
|
%4:_(s8) = G_CONSTANT i16 2
|
|
%5:_(s8) = G_SELECT %2, %3, %4
|
|
%6:_(s32) = G_ANYEXT %5
|
|
$vgpr0 = COPY %6
|
|
|
|
...
|
|
|
|
---
|
|
name: test_select_s7
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_s7
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s1), [[COPY1]], [[COPY2]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[SELECT]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(s7) = G_CONSTANT i16 1
|
|
%4:_(s7) = G_CONSTANT i16 2
|
|
%5:_(s7) = G_SELECT %2, %3, %4
|
|
%6:_(s32) = G_ANYEXT %5
|
|
$vgpr0 = COPY %6
|
|
|
|
...
|
|
---
|
|
name: test_select_v2s16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_select_v2s16
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[C]](s32), [[COPY]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(<2 x s16>) = G_CONSTANT i32 1
|
|
; CHECK: [[C2:%[0-9]+]]:_(<2 x s16>) = G_CONSTANT i32 2
|
|
; CHECK: [[SELECT:%[0-9]+]]:_(<2 x s16>) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
|
|
; CHECK: $vgpr0 = COPY [[SELECT]](<2 x s16>)
|
|
%0:_(s32) = G_CONSTANT i32 0
|
|
%1:_(s32) = COPY $vgpr0
|
|
|
|
%2:_(s1) = G_ICMP intpred(ne), %0, %1
|
|
%3:_(<2 x s16>) = G_CONSTANT i32 1
|
|
%4:_(<2 x s16>) = G_CONSTANT i32 2
|
|
%5:_(<2 x s16>) = G_SELECT %2, %3, %4
|
|
$vgpr0 = COPY %5
|
|
|
|
...
|