1 ; RUN: llc -o - %s | FileCheck %s
2 ; The selection DAG select(select()) normalisation crashed for different types
3 ; on the condition inputs.
4 target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
5 target triple = "mips--"
8 ; CHECK: sltiu ${{[0-9]*}}, ${{[0-9]*}}, 42
9 ; CHECK: sltiu ${{[0-9]*}}, ${{[0-9]*}}, 23
10 ; CHECK: and ${{[0-9]*}}, ${{[0-9]*}}, ${{[0-9]*}}
11 ; CHECK: sltu ${{[0-9]*}}, ${{[0-9]*}}, ${{[0-9]*}}
12 ; CHECK: addiu ${{[0-9]*}}, ${{[0-9]*}}, -1
13 ; CHECK: movn ${{[0-9]*}}, ${{[0-9]*}}, ${{[0-9]*}}
15 ; CHECK: move ${{[0-9]*}}, ${{[0-9]*}}
16 define i64 @foobar(i32 %arg) #0 {
18 %cmp0 = icmp ult i32 %arg, 23
19 %cmp1 = icmp ult i32 %arg, 42
20 %and = and i1 %cmp0, %cmp1
21 %cmp2 = icmp ugt i32 %arg, 0
22 %sext = sext i1 %cmp1 to i64
23 %retval.0 = select i1 %and, i64 %sext, i64 0