2012-03-08 03:32:42 +00:00
|
|
|
; RUN: llc < %s -march=mipsel | FileCheck %s
|
|
|
|
|
|
|
|
@g1 = external global i32
|
|
|
|
|
|
|
|
define i32 @foo0(i32 %s) nounwind readonly {
|
|
|
|
entry:
|
2012-05-12 00:48:43 +00:00
|
|
|
; CHECK: movn ${{[0-9]+}}, $zero
|
2012-03-08 03:32:42 +00:00
|
|
|
%tobool = icmp ne i32 %s, 0
|
2013-04-30 17:52:57 +00:00
|
|
|
%0 = load i32* @g1, align 4
|
2012-03-08 03:32:42 +00:00
|
|
|
%cond = select i1 %tobool, i32 0, i32 %0
|
|
|
|
ret i32 %cond
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @foo1(i32 %s) nounwind readonly {
|
|
|
|
entry:
|
2012-05-12 00:48:43 +00:00
|
|
|
; CHECK: movz ${{[0-9]+}}, $zero
|
2012-03-08 03:32:42 +00:00
|
|
|
%tobool = icmp ne i32 %s, 0
|
2013-04-30 17:52:57 +00:00
|
|
|
%0 = load i32* @g1, align 4
|
2012-03-08 03:32:42 +00:00
|
|
|
%cond = select i1 %tobool, i32 %0, i32 0
|
|
|
|
ret i32 %cond
|
|
|
|
}
|