brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 2bca029 Raw
28 lines · plain
1; RUN: llc < %s -O0 -fast-isel -mattr=+vsx -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -ppc-late-peephole=false | FileCheck %s --check-prefix=ELF64VSX2 3;; The semantics of VSX stores for when R0 is used is different depending on4;; whether it is used as base or offset. If used as base, the effective5;; address computation will use zero regardless of the content of R0. If used as6;; an offset the content will be used in the effective address. We observed that7;; for some constructors, the initialization values were being stored without8;; an offset register being specified which was causing R0 to be used as offset9;; in regions where it contained the value in the link register. This test10;; verifies that R0 is used as base in these situations.11 12%SomeStruct = type { double }13 14; ELF64VSX-LABEL: SomeStructCtor15define linkonce_odr void @SomeStructCtor(ptr %this, double %V) unnamed_addr align 2 {16entry:17  %this.addr = alloca ptr, align 818  %V.addr = alloca double, align 819  store ptr %this, ptr %this.addr, align 820; ELF64VSX: stfd {{[0-9][0-9]?}}, -{{[1-9][0-9]?}}({{[1-9][0-9]?}})21  store double %V, ptr %V.addr, align 822  %this1 = load ptr, ptr %this.addr23; ELF64VSX: stxsdx {{[0-9][0-9]?}}, 0, {{[1-9][0-9]?}}24  %0 = load double, ptr %V.addr, align 825  store double %0, ptr %this1, align 826  ret void27 }28