brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 5174e73 Raw
37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -O0 < %s \3; RUN:    | FileCheck -check-prefix=NOOPT %s4; RUN: llc -relocation-model=static -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \5; RUN:     -mcpu=pwr8 < %s | FileCheck -check-prefix=STATIC %s6 7;; Test loading and storing a common symbol for static relocation model.8 9@comm_glob = common dso_local global i32 0, align 410 11define dso_local signext i32 @test_comm() nounwind {12; NOOPT-LABEL: test_comm:13; NOOPT:       # %bb.0: # %entry14; NOOPT-NEXT:    addis 3, 2, comm_glob@toc@ha15; NOOPT-NEXT:    addi 3, 3, comm_glob@toc@l16; NOOPT-NEXT:    lwz 3, 0(3)17; NOOPT-NEXT:    addi 4, 3, 118; NOOPT-NEXT:    addis 5, 2, comm_glob@toc@ha19; NOOPT-NEXT:    addi 5, 5, comm_glob@toc@l20; NOOPT-NEXT:    stw 4, 0(5)21; NOOPT-NEXT:    extsw 3, 322; NOOPT-NEXT:    blr23;24; STATIC-LABEL: test_comm:25; STATIC:       # %bb.0: # %entry26; STATIC-NEXT:    addis 4, 2, comm_glob@toc@ha27; STATIC-NEXT:    lwa 3, comm_glob@toc@l(4)28; STATIC-NEXT:    addi 5, 3, 129; STATIC-NEXT:    stw 5, comm_glob@toc@l(4)30; STATIC-NEXT:    blr31entry:32  %0 = load i32, ptr @comm_glob, align 433  %inc = add nsw i32 %0, 134  store i32 %inc, ptr @comm_glob, align 435  ret i32 %036}37