aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/R600/select64.ll
blob: 6b87d9865ad6b65ac30c780613728668b10e74fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s

; CHECK-LABEL: @select0
; i64 select should be split into two i32 selects, and we shouldn't need
; to use a shfit to extract the hi dword of the input.
; CHECK-NOT: S_LSHR_B64
; CHECK: V_CNDMASK
; CHECK: V_CNDMASK
define void @select0(i64 addrspace(1)* %out, i32 %cond, i64 %in) {
entry:
  %0 = icmp ugt i32 %cond, 5
  %1 = select i1 %0, i64 0, i64 %in
  store i64 %1, i64 addrspace(1)* %out
  ret void
}