[PATCH] D138179: MIPS: fix build from IR files, nan2008 and FpAbi
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 10:32:29 PST 2022
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Rubber stamp. I try to find some mips folks who can verify, so maybe wait a day or so.
> When we use llc or lld to compiler IR files, the features +nan2008 and +fpxx/+fp64 are not used. Thus wrong format files are produced.
Not sure lld is related. It just consumes the bitcode input when using LTO. Did you mean Clang?
================
Comment at: llvm/lib/Target/Mips/MipsAsmPrinter.cpp:402
MipsTargetStreamer &TS = getTargetStreamer();
+ TS.updateABIInfo(*Subtarget);
----------------
Seems that you can group TS/MTM declaration together, and then place `TS.` calls together?
================
Comment at: llvm/test/CodeGen/Mips/abiflags-2008-fp64.ll:1
+; RUN: llc -filetype=asm %s -o - | FileCheck %s
+
----------------
================
Comment at: llvm/test/CodeGen/Mips/abiflags-2008-fp64.ll:11
+
+attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="mips32r2" "target-features"="+fp64,+mips32r2,+nan2008,-noabicalls" }
+
----------------
Delete unrelated attributes from the list.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138179/new/
https://reviews.llvm.org/D138179
More information about the llvm-commits
mailing list