1 ; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16 2 3 @i = global i64 4294967295, align 8 4 @j = global i64 15, align 8 5 @ii = global i64 4294967295, align 8 6 @k = common global i64 0, align 8 7 @l = common global i64 0, align 8 8 @m = common global i64 0, align 8 9 10 define void @test1() nounwind { 11 entry: 12 %0 = load i64, i64* @i, align 8 13 %1 = load i64, i64* @j, align 8 14 %add = add nsw i64 %1, %0 15 store i64 %add, i64* @k, align 8 16 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 17 ; 16: sltu ${{[0-9]+}}, ${{[0-9]+}} 18 ; 16: move ${{[0-9]+}}, $t8 19 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 20 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 21 ret void 22 } 23 24 define void @test2() nounwind { 25 entry: 26 %0 = load i64, i64* @i, align 8 27 %1 = load i64, i64* @j, align 8 28 %sub = sub nsw i64 %0, %1 29 ; 16: subu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 30 ; 16: sltu ${{[0-9]+}}, ${{[0-9]+}} 31 ; 16: move ${{[0-9]+}}, $t8 32 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 33 ; 16: subu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 34 store i64 %sub, i64* @l, align 8 35 ret void 36 } 37 38 define void @test3() nounwind { 39 entry: 40 %0 = load i64, i64* @ii, align 8 41 %add = add nsw i64 %0, 15 42 ; 16: addiu ${{[0-9]+}}, 15 43 ; 16: sltu ${{[0-9]+}}, ${{[0-9]+}} 44 ; 16: move ${{[0-9]+}}, $t8 45 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 46 ; 16: addu ${{[0-9]+}}, ${{[0-9]+}}, ${{[0-9]+}} 47 store i64 %add, i64* @m, align 8 48 ret void 49 } 50 51 52