[all-commits] [llvm/llvm-project] 40cd26: [Win64] Handle FP arguments more gracefully under ...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Tue Jan 14 17:19:39 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 40cd26c7008183e01d8276396339aea2a99d83d7
      https://github.com/llvm/llvm-project/commit/40cd26c7008183e01d8276396339aea2a99d83d7
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86CallingConv.td
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    A llvm/test/CodeGen/X86/no-sse-win64.ll
    A llvm/test/CodeGen/X86/no-sse-x86.ll
    R llvm/test/CodeGen/X86/nosse-error2.ll

  Log Message:
  -----------
  [Win64] Handle FP arguments more gracefully under -mno-sse

Pass small FP values in GPRs or stack memory according the the normal
convention. This is what gcc -mno-sse does on Win64.

I adjusted the conditions under which we emit an error to check if the
argument or return value would be passed in an XMM register when SSE is
disabled. This has a side effect of no longer emitting an error for FP
arguments marked 'inreg' when targetting x86 with SSE disabled. Our
calling convention logic was already assigning it to FP0/FP1, and then
we emitted this error. That seems unnecessary, we can ignore 'inreg' and
compile it without SSE.

Reviewers: jyknight, aemerson

Differential Revision: https://reviews.llvm.org/D70465




More information about the All-commits mailing list