[PATCH] [mips] Move F128 argument handling into MipsCCState as we did for returns. NFC.

Daniel Sanders daniel.sanders at imgtec.com
Sun Nov 2 08:13:54 PST 2014


================
Comment at: lib/Target/Mips/MipsISelLowering.cpp:116
@@ +115,3 @@
+      Function::const_arg_iterator FuncArg = MF.getFunction()->arg_begin();
+      std::advance(FuncArg, Ins[i].OrigArgIndex);
+
----------------
chapuni wrote:
> FuncArg might not be paired corresponding to Ins.
> Consider, CodeGen's sret arg in Ins.
> Does it satisfy assert(Ins[i].OrigArgIndex < MF.getFunction()->arg_size()) in CodeGen/Mips/return-vector.ll?
Well spotted. sret arguments are always pointers (so they can never originate from an f128 or {f128}) so I've re-committed with an explicit check for them that skips the originalTypeIsF128() call and pushes false into the vector instead.

I also checked PreAnalyzeCallOperandsForF128() and it doesn't see sret arguments.

http://reviews.llvm.org/D5969






More information about the llvm-commits mailing list