From: James Y Knight Date: Thu, 4 Apr 2019 19:05:48 +0000 (+0000) Subject: Revert [X86] When using Win64 ABI, exit with error if SSE is disabled for varargs X-Git-Tag: llvmorg-10-init~8450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0401744185b4b8b7aef000d84828197c6f20a1d;p=platform%2Fupstream%2Fllvm.git Revert [X86] When using Win64 ABI, exit with error if SSE is disabled for varargs It unnecessarily breaks previously-working code which used varargs, but didn't pass any float/double arguments (such as EDK2). Also revert the fixup on top of that: Revert [X86] Fix a test from r357317 This reverts r357317 (git commit d413f41de6baf500e5d20c638375447e18777db2) This reverts r357380 (git commit 7af32444b9b17719ebabb6bee6eb52465acc8507) llvm-svn: 357718 --- diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index e0c3aaa..d599a61 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -3780,9 +3780,6 @@ X86TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, } else if (VA.isRegLoc()) { RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); if (isVarArg && IsWin64) { - if (!Subtarget.hasSSE1()) - errorUnsupported( - DAG, dl, "Win64 ABI varargs functions require SSE to be enabled"); // Win64 ABI requires argument XMM reg to be copied to the corresponding // shadow reg if callee is a varargs function. unsigned ShadowReg = 0; diff --git a/llvm/test/CodeGen/X86/win64-nosse-error.ll b/llvm/test/CodeGen/X86/win64-nosse-error.ll deleted file mode 100644 index 8cc5520..0000000 --- a/llvm/test/CodeGen/X86/win64-nosse-error.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: not --crash llc < %s -mattr="-sse" 2>&1 | FileCheck %s - -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-pc-windows-macho" - -; Function Attrs: noimplicitfloat noinline noredzone nounwind optnone -define void @crash() #0 { - call void (i32*, ...) @func(i32* null, double undef) - ret void -} -; CHECK: in function crash void (): Win64 ABI varargs functions require SSE to be enabled -; Function Attrs: noimplicitfloat noredzone -declare void @func(i32*, ...) - -attributes #0 = { "target-cpu"="x86-64" "target-features"="-sse"} - -