[PATCH] D102995: errorUnsupported should be non-fatal

MJ via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 24 18:52:20 PDT 2021


majiang31312 updated this revision to Diff 347545.
majiang31312 set the repository for this revision to rG LLVM Github Monorepo.
majiang31312 added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

CI failed to patch?   Retry with Repository 'rG <https://reviews.llvm.org/source/llvm-github/> LLVM Github Monorepo'


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102995/new/

https://reviews.llvm.org/D102995

Files:
  clang/test/CodeGen/x86_64-mno-sse.c
  clang/test/CodeGen/x86_64-mno-sse2.c
  llvm/lib/Target/X86/X86ISelLowering.cpp


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -96,8 +96,8 @@
 static void errorUnsupported(SelectionDAG &DAG, const SDLoc &dl,
                              const char *Msg) {
   MachineFunction &MF = DAG.getMachineFunction();
-  DAG.getContext()->diagnose(
-      DiagnosticInfoUnsupported(MF.getFunction(), Msg, dl.getDebugLoc()));
+  DAG.getContext()->diagnose(DiagnosticInfoUnsupported(
+      MF.getFunction(), Msg, dl.getDebugLoc(), DS_Warning));
 }
 
 X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
Index: clang/test/CodeGen/x86_64-mno-sse2.c
===================================================================
--- clang/test/CodeGen/x86_64-mno-sse2.c
+++ clang/test/CodeGen/x86_64-mno-sse2.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -triple x86_64-linux -target-feature -sse2 -S -o /dev/null -verify %s
 // REQUIRES: x86-registered-target
 
-double f1(void) { // expected-error {{SSE2 register return with SSE2 disabled}}
+double f1(void) { // expected-warning {{SSE2 register return with SSE2 disabled}}
   return 1.4;
 }
 extern double g;
-void f2(void) { // expected-error {{SSE2 register return with SSE2 disabled}}
+void f2(void) { // expected-warning {{SSE2 register return with SSE2 disabled}}
   g = f1();
 }
 void take_double(double);
@@ -15,6 +15,6 @@
 }
 
 double return_double();
-void call_double(double *a) { // expected-error {{SSE2 register return with SSE2 disabled}}
+void call_double(double *a) { // expected-warning {{SSE2 register return with SSE2 disabled}}
   *a = return_double();
 }
Index: clang/test/CodeGen/x86_64-mno-sse.c
===================================================================
--- clang/test/CodeGen/x86_64-mno-sse.c
+++ clang/test/CodeGen/x86_64-mno-sse.c
@@ -1,15 +1,14 @@
 // RUN: %clang_cc1 -triple x86_64-linux -target-feature -sse -target-feature -sse2 -S -o /dev/null -verify %s
 // REQUIRES: x86-registered-target
 
-double f1(void) { // expected-error {{SSE register return with SSE disabled}}
+double f1(void) { // expected-warning {{SSE register return with SSE disabled}}
   return 1.4;
 }
 extern double g;
-void f2(void) { // expected-error {{SSE register return with SSE disabled}}
+void f2(void) { // expected-warning {{SSE register return with SSE disabled}}
   g = f1();
 }
 void take_double(double);
 void pass_double(void) {
-  // FIXME: Still asserts.
-  //take_double(1.5);
+  take_double(1.5);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102995.347545.patch
Type: text/x-patch
Size: 2545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210525/f3c3e332/attachment-0001.bin>


More information about the cfe-commits mailing list