aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/setcc-se.ll
blob: 03af91386082242cc697b7fb2277312b970a498c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: llc -march=mipsel < %s | FileCheck %s

; CHECK: seteq0:
; CHECK: sltiu ${{[0-9]+}}, $4, 1

define i32 @seteq0(i32 %a) {
entry:
  %cmp = icmp eq i32 %a, 0
  %conv = zext i1 %cmp to i32
  ret i32 %conv
}

; CHECK: setne0:
; CHECK: sltu ${{[0-9]+}}, $zero, $4

define i32 @setne0(i32 %a) {
entry:
  %cmp = icmp ne i32 %a, 0
  %conv = zext i1 %cmp to i32
  ret i32 %conv
}