[llvm] [PowerPC] option `-msoft-float` should not block the PC-relative address instruction (PR #92543)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 20:17:21 PDT 2024


================
@@ -0,0 +1,15 @@
+; RUN: llc -ppc-asm-full-reg-names -o - %s| FileCheck %s
+
+target triple = "powerpc64le-unknown-linux-gnu"
+
+ at bar = dso_local global i32 0, align 4
+
+define dso_local ptr @foo() #0 {
+entry:
+  ret ptr @bar
+}
+
+attributes #0 = { noinline nounwind optnone uwtable "target-cpu"="pwr10" "target-features"="+altivec,+isa-v30-instructions,+isa-v31-instructions,+pcrelative-memops,+power10-vector,+power9-vector,+prefix-instrs,+vsx,-hard-float" "use-soft-float"="true" }
----------------
chenzheng1030 wrote:

Will the attribute:
`attributes #0 = {"use-soft-float"="true"}` and adding -mcpu=pwr10 in the run line get the expected output?

https://github.com/llvm/llvm-project/pull/92543


More information about the llvm-commits mailing list