brintos

brintos / llvm-project-archived public Read only

0
0
Text · 998 B · 8dba2be Raw
31 lines · plain
1; RUN: llc -relocation-model=pic < %s | FileCheck %s2 3; The load restoring r30 at the end of the function was placed out of order4; relative to its uses as the PIC base pointer.5; This was because the r30 operand was not marked as "def" which allowed6; the post-RA scheduler to move it over other uses of r30.7 8; CHECK-LABEL: fred9; CHECK:       lwz 30, 24(1)10; R30 should not appear in an instruction after it's been restored.11; CHECK-NOT:   30,12 13target datalayout = "E-m:e-p:32:32-i64:64-n32"14target triple = "powerpc--"15 16define double @fred(i64 %a) #0 {17entry:18  %0 = lshr i64 %a, 3219  %conv = trunc i64 %0 to i3220  %conv1 = sitofp i32 %conv to double21  %mul = fmul double %conv1, 0x41F000000000000022  %and = and i64 %a, 429496729523  %or = or i64 %and, 484136959942328320024  %sub = fadd double %mul, 0xC33000000000000025  %1 = bitcast i64 %or to double26  %add = fadd double %sub, %127  ret double %add28}29 30attributes #0 = { norecurse nounwind readnone "target-cpu"="ppc" "use-soft-float"="false" }31