1 ; RUN: llc < %s -march=mipsel | FileCheck %s 2 3 @g1 = external global i32 4 5 define i32 @foo0(i32 %s) nounwind readonly { 6 entry: 7 ; CHECK-NOT: addiu 8 ; CHECK: movn 9 %tobool = icmp ne i32 %s, 0 10 %0 = load i32* @g1, align 4, !tbaa !0 11 %cond = select i1 %tobool, i32 0, i32 %0 12 ret i32 %cond 13 } 14 15 define i32 @foo1(i32 %s) nounwind readonly { 16 entry: 17 ; CHECK-NOT: addiu 18 ; CHECK: movz 19 %tobool = icmp ne i32 %s, 0 20 %0 = load i32* @g1, align 4, !tbaa !0 21 %cond = select i1 %tobool, i32 %0, i32 0 22 ret i32 %cond 23 } 24 25 !0 = metadata !{metadata !"int", metadata !1} 26 !1 = metadata !{metadata !"omnipotent char", metadata !2} 27 !2 = metadata !{metadata !"Simple C/C++ TBAA", null} 28