2017-10-19 07:18:12 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-05-06 05:19:59 +08:00
|
|
|
# RUN: llc -O0 -march=amdgcn -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s
|
AMDGPU/GlobalISel: Mark 32-bit G_SELECT as legal
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D33949
llvm-svn: 304910
2017-06-07 21:54:51 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
define void @test_select() { ret void }
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
name: test_select
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: _ }
|
|
|
|
- { id: 2, class: _ }
|
|
|
|
- { id: 3, class: _ }
|
|
|
|
- { id: 4, class: _ }
|
|
|
|
- { id: 5, class: _ }
|
|
|
|
body: |
|
|
|
|
bb.0:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $vgpr0
|
2017-10-19 07:18:12 +08:00
|
|
|
; CHECK-LABEL: name: test_select
|
2017-10-25 02:04:54 +08:00
|
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
2017-10-25 02:04:54 +08:00
|
|
|
; 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]]
|
AMDGPU/GlobalISel: Mark 32-bit G_SELECT as legal
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D33949
llvm-svn: 304910
2017-06-07 21:54:51 +08:00
|
|
|
%0(s32) = G_CONSTANT i32 0
|
2018-02-01 06:04:26 +08:00
|
|
|
%1(s32) = COPY $vgpr0
|
AMDGPU/GlobalISel: Mark 32-bit G_SELECT as legal
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D33949
llvm-svn: 304910
2017-06-07 21:54:51 +08:00
|
|
|
|
|
|
|
%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
|
2018-02-01 06:04:26 +08:00
|
|
|
$vgpr0 = COPY %5
|
AMDGPU/GlobalISel: Mark 32-bit G_SELECT as legal
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D33949
llvm-svn: 304910
2017-06-07 21:54:51 +08:00
|
|
|
|
|
|
|
...
|