brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · f9bb1b0 Raw
41 lines · plain
1; RUN: llc  -mtriple=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16_h2; RUN: llc  -mtriple=mipsel -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=16_b3 4@.str = private unnamed_addr constant [9 x i8] c"%hd %c \0A\00", align 15@sp = common global ptr null, align 46@cp = common global ptr null, align 47 8declare i32 @printf(ptr nocapture, ...) nounwind9 10define void @test() nounwind {11entry:12  %s = alloca i16, align 413  %c = alloca i8, align 414  store i16 16, ptr %s, align 415  store i8 99, ptr %c, align 416  store ptr %s, ptr @sp, align 417  store ptr %c, ptr @cp, align 418  %call.i.i = call i32 (ptr, ...) @printf(ptr @.str, i32 16, i32 99) nounwind19  %0 = load ptr, ptr @sp, align 420  store i16 32, ptr %0, align 221  %1 = load ptr, ptr @cp, align 422  store i8 97, ptr %1, align 123  %2 = load i16, ptr %s, align 424  %3 = load i8, ptr %c, align 425  %conv.i = sext i16 %2 to i3226  %conv1.i = sext i8 %3 to i3227  %call.i = call i32 (ptr, ...) @printf(ptr @.str, i32 %conv.i, i32 %conv1.i) nounwind28  ret void29; 16_b-LABEL: test:30; 16_h-LABEL: test:31; 16_b:	sb	${{[0-9]+}}, [[offset1:[0-9]+]](${{[0-9]+}})32; 16_b: lb      ${{[0-9]+}}, [[offset1]](${{[0-9]+}})33; 16_h:	sh	${{[0-9]+}}, [[offset2:[0-9]+]](${{[0-9]+}})34; 16_h: lh      ${{[0-9]+}}, [[offset2]](${{[0-9]+}})35}36 37declare void @llvm.lifetime.start.p0(i64, ptr nocapture) nounwind38 39declare void @llvm.lifetime.end.p0(i64, ptr nocapture) nounwind40 41