65 lines · plain
1; RUN: llc --mtriple=loongarch64 -mattr=+d,+relax --stop-after loongarch-prera-expand-pseudo \2; RUN: --relocation-model=pic --code-model=medium %s -o %t.mir3; RUN: llc --mtriple=loongarch64 -mattr=+d,+relax --run-pass loongarch-prera-expand-pseudo \4; RUN: --code-model=medium %t.mir -o - | FileCheck %s --check-prefixes=CHECK,MEDCALL5; RUN: llc --mtriple=loongarch64 -mattr=+d,+relax --run-pass loongarch-expand-pseudo \6; RUN: --code-model=medium %t.mir -o - | FileCheck %s --check-prefixes=CHECK,CALL367 8; RUN: llc --mtriple=loongarch64 -mattr=+d,+relax --stop-after loongarch-prera-expand-pseudo \9; RUN: --relocation-model=pic --enable-tlsdesc --code-model=medium %s -o %t.desc.mir10; RUN: llc --mtriple=loongarch64 -mattr=+d,+relax --run-pass loongarch-prera-expand-pseudo \11; RUN: --code-model=medium %t.desc.mir -o - | FileCheck %s --check-prefix=DESC12 13;; Check target-flags after expand-pseudo pass.14 15@g_e = external global i3216@g_i = internal global i32 017@t_un = external thread_local global i3218@t_ld = external thread_local(localdynamic) global i3219@t_ie = external thread_local(initialexec) global i3220@t_le = external thread_local(localexec) global i3221 22declare void @callee1() nounwind23declare dso_local void @callee2() nounwind24declare dso_local void @callee3() nounwind25 26define void @caller() nounwind {27; CHECK: target-flags(loongarch-got-pc-hi, loongarch-relax) @g_e28; CHECK-NEXT: target-flags(loongarch-got-pc-lo, loongarch-relax) @g_e29; CHECK: target-flags(loongarch-pcrel-hi, loongarch-relax) @g_i30; CHECK-NEXT: target-flags(loongarch-pcrel-lo, loongarch-relax) @g_i31; CHECK: target-flags(loongarch-gd-pc-hi, loongarch-relax) @t_un32; CHECK-NEXT: target-flags(loongarch-got-pc-lo, loongarch-relax) @t_un33; DESC: target-flags(loongarch-desc-pc-hi, loongarch-relax) @t_un34; DESC-NEXT: target-flags(loongarch-desc-pc-lo, loongarch-relax) @t_un35; DESC-NEXT: target-flags(loongarch-desc-ld, loongarch-relax) @t_un36; DESC-NEXT: target-flags(loongarch-desc-call, loongarch-relax) @t_un37; CHECK: target-flags(loongarch-ld-pc-hi, loongarch-relax) @t_ld38; CHECK-NEXT: target-flags(loongarch-got-pc-lo, loongarch-relax) @t_ld39; DESC: target-flags(loongarch-desc-pc-hi, loongarch-relax) @t_ld40; DESC-NEXT: target-flags(loongarch-desc-pc-lo, loongarch-relax) @t_ld41; DESC-NEXT: target-flags(loongarch-desc-ld, loongarch-relax) @t_ld42; DESC-NEXT: target-flags(loongarch-desc-call, loongarch-relax) @t_ld43; CHECK: target-flags(loongarch-ie-pc-hi, loongarch-relax) @t_ie44; CHECK-NEXT: target-flags(loongarch-ie-pc-lo, loongarch-relax) @t_ie45; CHECK: target-flags(loongarch-le-hi-r) @t_le46; CHECK-NEXT: target-flags(loongarch-le-add-r) @t_le47; CHECK-NEXT: target-flags(loongarch-le-lo-r) @t_le48; MEDCALL: target-flags(loongarch-call-plt) @callee149; CALL36: target-flags(loongarch-call36) @callee150; MEDCALL: target-flags(loongarch-call) @callee251; CALL36: target-flags(loongarch-call36) @callee252; MEDCALL: target-flags(loongarch-call) @callee353; CALL36: target-flags(loongarch-call36) @callee354 %a = load volatile i32, ptr @g_e55 %b = load volatile i32, ptr @g_i56 %c = load volatile i32, ptr @t_un57 %d = load volatile i32, ptr @t_ld58 %e = load volatile i32, ptr @t_ie59 %f = load volatile i32, ptr @t_le60 call i32 @callee1()61 call i32 @callee2()62 tail call i32 @callee3()63 ret void64}65