From 80b3dcc045f8ea6e5e532d8891bbf1305bce89e8 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 30 May 2022 19:16:06 +0100 Subject: [PATCH] [Support] Make report_fatal_error respect its GenCrashDiag argument so it doesn't generate a backtrace There are a few places where we use report_fatal_error when the input is broken. Currently, this function always crashes LLVM with an abort signal, which then triggers the backtrace printing code. I think this is excessive, as wrong input shouldn't give a link to LLVM's github issue URL and tell users to file a bug report. We shouldn't print a stack trace either. This patch changes report_fatal_error so it uses exit() rather than abort() when its argument GenCrashDiag=false. Reviewed by: nikic, MaskRay, RKSimon Differential Revision: https://reviews.llvm.org/D126550 --- llvm/lib/Support/ErrorHandling.cpp | 5 ++++- llvm/lib/Target/Mips/MipsSubtarget.cpp | 2 +- llvm/lib/Transforms/IPO/BlockExtractor.cpp | 11 +++++++---- llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 +- llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | 2 +- llvm/test/CodeGen/ARM/codemodel.ll | 4 ++-- llvm/test/CodeGen/BPF/xadd.ll | 4 ++-- llvm/test/CodeGen/Lanai/codemodel.ll | 4 ++-- llvm/test/CodeGen/Mips/cpus.ll | 2 +- llvm/test/CodeGen/Mips/fp64a.ll | 6 +++--- llvm/test/CodeGen/Mips/fpxx.ll | 4 ++-- llvm/test/CodeGen/Mips/micromips64-unsupported.ll | 4 ++-- llvm/test/CodeGen/Mips/mips32r6/compatibility.ll | 2 +- llvm/test/CodeGen/Mips/mips64r6/compatibility.ll | 2 +- llvm/test/CodeGen/Mips/msa/3r-a.ll | 2 +- llvm/test/CodeGen/PowerPC/codemodel.ll | 4 ++-- llvm/test/CodeGen/SPARC/codemodel.ll | 4 ++-- llvm/test/CodeGen/SystemZ/codemodel.ll | 4 ++-- llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll | 4 ++-- llvm/test/CodeGen/X86/codemodel.ll | 2 +- llvm/test/MC/Mips/micromips64-unsupported.s | 8 ++++---- llvm/test/MC/Mips/micromips64r6-unsupported.s | 2 +- llvm/test/Other/optimization-remarks-inline.ll | 2 +- llvm/test/Transforms/BlockExtractor/invalid-block.ll | 2 +- llvm/test/Transforms/BlockExtractor/invalid-function.ll | 2 +- llvm/test/Transforms/BlockExtractor/invalid-line.ll | 2 +- llvm/test/Transforms/GCOVProfiling/version.ll | 2 +- llvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll | 2 +- 28 files changed, 51 insertions(+), 45 deletions(-) diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index 80c0e00..3acae3f 100644 --- a/llvm/lib/Support/ErrorHandling.cpp +++ b/llvm/lib/Support/ErrorHandling.cpp @@ -119,7 +119,10 @@ void llvm::report_fatal_error(const Twine &Reason, bool GenCrashDiag) { // files registered with RemoveFileOnSignal. sys::RunInterruptHandlers(); - abort(); + if (GenCrashDiag) + abort(); + else + exit(126); } void llvm::install_bad_alloc_error_handler(fatal_error_handler_t handler, diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 5c61275..10530cd 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -116,7 +116,7 @@ MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS, if (isFP64bit() && !hasMips64() && hasMips32() && !hasMips32r2()) report_fatal_error( "FPU with 64-bit registers is not available on MIPS32 pre revision 2. " - "Use -mcpu=mips32r2 or greater."); + "Use -mcpu=mips32r2 or greater.", false); if (!isABI_O32() && !useOddSPReg()) report_fatal_error("-mattr=+nooddspreg requires the O32 ABI.", false); diff --git a/llvm/lib/Transforms/IPO/BlockExtractor.cpp b/llvm/lib/Transforms/IPO/BlockExtractor.cpp index 7c178f9..9e27ae4 100644 --- a/llvm/lib/Transforms/IPO/BlockExtractor.cpp +++ b/llvm/lib/Transforms/IPO/BlockExtractor.cpp @@ -135,7 +135,8 @@ void BlockExtractor::loadFile() { if (LineSplit.empty()) continue; if (LineSplit.size()!=2) - report_fatal_error("Invalid line format, expecting lines like: 'funcname bb1[;bb2..]'"); + report_fatal_error("Invalid line format, expecting lines like: 'funcname bb1[;bb2..]'", + /*GenCrashDiag=*/false); SmallVector BBNames; LineSplit[1].split(BBNames, ';', /*MaxSplit=*/-1, /*KeepEmpty=*/false); @@ -194,13 +195,15 @@ bool BlockExtractor::runOnModule(Module &M) { for (const auto &BInfo : BlocksByName) { Function *F = M.getFunction(BInfo.first); if (!F) - report_fatal_error("Invalid function name specified in the input file"); + report_fatal_error("Invalid function name specified in the input file", + /*GenCrashDiag=*/false); for (const auto &BBInfo : BInfo.second) { auto Res = llvm::find_if(*F, [&](const BasicBlock &BB) { return BB.getName().equals(BBInfo); }); if (Res == F->end()) - report_fatal_error("Invalid block name specified in the input file"); + report_fatal_error("Invalid block name specified in the input file", + /*GenCrashDiag=*/false); GroupsOfBlocks[NextGroupIdx].push_back(&*Res); } ++NextGroupIdx; @@ -212,7 +215,7 @@ bool BlockExtractor::runOnModule(Module &M) { for (BasicBlock *BB : BBs) { // Check if the module contains BB. if (BB->getParent()->getParent() != &M) - report_fatal_error("Invalid basic block"); + report_fatal_error("Invalid basic block", /*GenCrashDiag=*/false); LLVM_DEBUG(dbgs() << "BlockExtractor: Extracting " << BB->getParent()->getName() << ":" << BB->getName() << "\n"); diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 6de797c..ac4a1fd 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -81,7 +81,7 @@ GCOVOptions GCOVOptions::getDefault() { if (DefaultGCOVVersion.size() != 4) { llvm::report_fatal_error(Twine("Invalid -default-gcov-version: ") + - DefaultGCOVVersion); + DefaultGCOVVersion, /*GenCrashDiag=*/false); } memcpy(Options.Version, DefaultGCOVVersion.c_str(), 4); return Options; diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp index 45fbf2a..4bb1d3f 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -909,7 +909,7 @@ bool llvm::computeUnrollCount( if (PP.PeelCount) { if (UnrollCount.getNumOccurrences() > 0) { report_fatal_error("Cannot specify both explicit peel count and " - "explicit unroll count"); + "explicit unroll count", /*GenCrashDiag=*/false); } UP.Count = 1; UP.Runtime = false; diff --git a/llvm/test/CodeGen/ARM/codemodel.ll b/llvm/test/CodeGen/ARM/codemodel.ll index ee43598..ec9982f 100644 --- a/llvm/test/CodeGen/ARM/codemodel.ll +++ b/llvm/test/CodeGen/ARM/codemodel.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=arm-none-eabi -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=arm-none-eabi -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL +; RUN: not llc -verify-machineinstrs -o - -mtriple=arm-none-eabi -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY +; RUN: not llc -verify-machineinstrs -o - -mtriple=arm-none-eabi -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL ; TINY: Target does not support the tiny CodeModel ; KERNEL: Target does not support the kernel CodeModel diff --git a/llvm/test/CodeGen/BPF/xadd.ll b/llvm/test/CodeGen/BPF/xadd.ll index db0fbd1..4f16c06 100644 --- a/llvm/test/CodeGen/BPF/xadd.ll +++ b/llvm/test/CodeGen/BPF/xadd.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -march=bpfel < %s 2>&1 | FileCheck %s -; RUN: not --crash llc -march=bpfeb < %s 2>&1 | FileCheck %s +; RUN: not llc -march=bpfel < %s 2>&1 | FileCheck %s +; RUN: not llc -march=bpfeb < %s 2>&1 | FileCheck %s ; This file is generated with the source command and source ; $ clang -target bpf -O2 -g -S -emit-llvm t.c diff --git a/llvm/test/CodeGen/Lanai/codemodel.ll b/llvm/test/CodeGen/Lanai/codemodel.ll index acfbaba..72d1d65 100644 --- a/llvm/test/CodeGen/Lanai/codemodel.ll +++ b/llvm/test/CodeGen/Lanai/codemodel.ll @@ -1,7 +1,7 @@ ; RUN: llc -march=lanai < %s | FileCheck %s ; RUN: llc -march=lanai < %s -code-model=small | FileCheck -check-prefix CHECK-SMALL %s -; RUN: not --crash llc -march=lanai < %s -code-model=tiny 2>&1 | FileCheck -check-prefix CHECK-TINY %s -; RUN: not --crash llc -march=lanai < %s -code-model=kernel 2>&1 | FileCheck -check-prefix CHECK-KERNEL %s +; RUN: not llc -march=lanai < %s -code-model=tiny 2>&1 | FileCheck -check-prefix CHECK-TINY %s +; RUN: not llc -march=lanai < %s -code-model=kernel 2>&1 | FileCheck -check-prefix CHECK-KERNEL %s ; CHECK-TINY: Target does not support the tiny CodeModel ; CHECK-KERNEL: Target does not support the kernel CodeModel diff --git a/llvm/test/CodeGen/Mips/cpus.ll b/llvm/test/CodeGen/Mips/cpus.ll index 995b0fd..077f8fb4 100644 --- a/llvm/test/CodeGen/Mips/cpus.ll +++ b/llvm/test/CodeGen/Mips/cpus.ll @@ -60,7 +60,7 @@ ; Check that we reject CPUs that are not implemented. -; RUN: not --crash llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips5 2>&1 \ +; RUN: not llc < %s -o /dev/null -mtriple=mips64 -mcpu=mips5 2>&1 \ ; RUN: | FileCheck %s --check-prefix=ERROR ; ERROR: LLVM ERROR: Code generation for MIPS-{{.}} is not implemented diff --git a/llvm/test/CodeGen/Mips/fp64a.ll b/llvm/test/CodeGen/Mips/fp64a.ll index 2bf5905..317afd7 100644 --- a/llvm/test/CodeGen/Mips/fp64a.ll +++ b/llvm/test/CodeGen/Mips/fp64a.ll @@ -7,16 +7,16 @@ ; We don't test MIPS32r1 since support for 64-bit coprocessors (such as a 64-bit ; FPU) on a 32-bit architecture was added in MIPS32r2. -; RUN: not --crash llc -march=mips -mcpu=mips32 -mattr=fp64 < %s 2>&1 | FileCheck %s -check-prefix=32R1-FP64 +; RUN: not llc -march=mips -mcpu=mips32 -mattr=fp64 < %s 2>&1 | FileCheck %s -check-prefix=32R1-FP64 ; RUN: llc -march=mips -mcpu=mips32r2 -mattr=fp64 < %s | FileCheck %s -check-prefixes=ALL,32R2-NO-FP64A-BE ; RUN: llc -march=mips -mcpu=mips32r2 -mattr=fp64,nooddspreg < %s | FileCheck %s -check-prefixes=ALL,32R2-FP64A ; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=fp64 < %s | FileCheck %s -check-prefixes=ALL,32R2-NO-FP64A-LE ; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=fp64,nooddspreg < %s | FileCheck %s -check-prefixes=ALL,32R2-FP64A ; RUN: llc -march=mips64 -mcpu=mips64 -mattr=fp64 < %s | FileCheck %s -check-prefixes=ALL,64-NO-FP64A -; RUN: not --crash llc -march=mips64 -mcpu=mips64 -mattr=fp64,nooddspreg < %s 2>&1 | FileCheck %s -check-prefix=64-FP64A +; RUN: not llc -march=mips64 -mcpu=mips64 -mattr=fp64,nooddspreg < %s 2>&1 | FileCheck %s -check-prefix=64-FP64A ; RUN: llc -march=mips64el -mcpu=mips64 -mattr=fp64 < %s | FileCheck %s -check-prefixes=ALL,64-NO-FP64A -; RUN: not --crash llc -march=mips64el -mcpu=mips64 -mattr=fp64,nooddspreg < %s 2>&1 | FileCheck %s -check-prefix=64-FP64A +; RUN: not llc -march=mips64el -mcpu=mips64 -mattr=fp64,nooddspreg < %s 2>&1 | FileCheck %s -check-prefix=64-FP64A ; 32R1-FP64: LLVM ERROR: FPU with 64-bit registers is not available on MIPS32 pre revision 2. Use -mcpu=mips32r2 or greater. ; 64-FP64A: LLVM ERROR: -mattr=+nooddspreg requires the O32 ABI. diff --git a/llvm/test/CodeGen/Mips/fpxx.ll b/llvm/test/CodeGen/Mips/fpxx.ll index 075eff1..6fdb95e 100644 --- a/llvm/test/CodeGen/Mips/fpxx.ll +++ b/llvm/test/CodeGen/Mips/fpxx.ll @@ -5,10 +5,10 @@ ; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=fpxx < %s | FileCheck %s -check-prefixes=ALL,32R2-FPXX ; RUN: llc -march=mips64 -mcpu=mips4 < %s | FileCheck %s -check-prefixes=ALL,4-NOFPXX -; RUN: not --crash llc -march=mips64 -mcpu=mips4 -mattr=fpxx < %s 2>&1 | FileCheck %s -check-prefix=4-FPXX +; RUN: not llc -march=mips64 -mcpu=mips4 -mattr=fpxx < %s 2>&1 | FileCheck %s -check-prefix=4-FPXX ; RUN: llc -march=mips64 -mcpu=mips64 < %s | FileCheck %s -check-prefixes=ALL,64-NOFPXX -; RUN: not --crash llc -march=mips64 -mcpu=mips64 -mattr=fpxx < %s 2>&1 | FileCheck %s -check-prefix=64-FPXX +; RUN: not llc -march=mips64 -mcpu=mips64 -mattr=fpxx < %s 2>&1 | FileCheck %s -check-prefix=64-FPXX ; RUN-TODO: llc -march=mips64 -mcpu=mips4 -target-abi o32 < %s | FileCheck %s -check-prefixes=ALL,4-O32-NOFPXX ; RUN-TODO: llc -march=mips64 -mcpu=mips4 -target-abi o32 -mattr=fpxx < %s | FileCheck %s -check-prefixes=ALL,4-O32-FPXX diff --git a/llvm/test/CodeGen/Mips/micromips64-unsupported.ll b/llvm/test/CodeGen/Mips/micromips64-unsupported.ll index 0f24167..713722e 100644 --- a/llvm/test/CodeGen/Mips/micromips64-unsupported.ll +++ b/llvm/test/CodeGen/Mips/micromips64-unsupported.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -mtriple=mips64-unknown-linux -mcpu=mips64r6 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64R6 -; RUN: not --crash llc -mtriple=mips64-unknown-linux -mcpu=mips64 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64 +; RUN: not llc -mtriple=mips64-unknown-linux -mcpu=mips64r6 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64R6 +; RUN: not llc -mtriple=mips64-unknown-linux -mcpu=mips64 -mattr=+micromips %s 2>&1 | FileCheck %s --check-prefix=MICROMIPS64 ; Test that microMIPS64(R6) is not supported. diff --git a/llvm/test/CodeGen/Mips/mips32r6/compatibility.ll b/llvm/test/CodeGen/Mips/mips32r6/compatibility.ll index 1adb1bc..8eac8d4 100644 --- a/llvm/test/CodeGen/Mips/mips32r6/compatibility.ll +++ b/llvm/test/CodeGen/Mips/mips32r6/compatibility.ll @@ -1,5 +1,5 @@ ; RUN: llc -march=mipsel -mcpu=mips32r6 < %s | FileCheck %s -; RUN: not --crash llc -march=mipsel -mcpu=mips32r6 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s +; RUN: not llc -march=mipsel -mcpu=mips32r6 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s ; CHECK: foo: ; DSP: MIPS32r6 is not compatible with the DSP ASE diff --git a/llvm/test/CodeGen/Mips/mips64r6/compatibility.ll b/llvm/test/CodeGen/Mips/mips64r6/compatibility.ll index 8b7607e..174f4ce 100644 --- a/llvm/test/CodeGen/Mips/mips64r6/compatibility.ll +++ b/llvm/test/CodeGen/Mips/mips64r6/compatibility.ll @@ -1,5 +1,5 @@ ; RUN: llc -march=mipsel -mcpu=mips64r6 -target-abi n64 < %s | FileCheck %s -; RUN: not --crash llc -march=mipsel -mcpu=mips64r6 -target-abi n64 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s +; RUN: not llc -march=mipsel -mcpu=mips64r6 -target-abi n64 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s ; CHECK: foo: ; DSP: MIPS64r6 is not compatible with the DSP ASE diff --git a/llvm/test/CodeGen/Mips/msa/3r-a.ll b/llvm/test/CodeGen/Mips/msa/3r-a.ll index 47d8eaa..933c4ed 100644 --- a/llvm/test/CodeGen/Mips/msa/3r-a.ll +++ b/llvm/test/CodeGen/Mips/msa/3r-a.ll @@ -5,7 +5,7 @@ ; RUN: llc -march=mipsel -mattr=+msa,+fp64,+mips32r2 -relocation-model=pic < %s | FileCheck %s ; It should fail to compile without fp64. -; RUN: not --crash llc -march=mips -mattr=+msa < %s 2>&1 | \ +; RUN: not llc -march=mips -mattr=+msa < %s 2>&1 | \ ; RUN: FileCheck -check-prefix=FP32ERROR %s ; FP32ERROR: LLVM ERROR: MSA requires a 64-bit FPU register file (FR=1 mode). diff --git a/llvm/test/CodeGen/PowerPC/codemodel.ll b/llvm/test/CodeGen/PowerPC/codemodel.ll index cbceaf78..ee3ceae 100644 --- a/llvm/test/CodeGen/PowerPC/codemodel.ll +++ b/llvm/test/CodeGen/PowerPC/codemodel.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=powerpc-pc-linux -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=powerpc-pc-linux -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL +; RUN: not llc -verify-machineinstrs -o - -mtriple=powerpc-pc-linux -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY +; RUN: not llc -verify-machineinstrs -o - -mtriple=powerpc-pc-linux -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL ; TINY: Target does not support the tiny CodeModel ; KERNEL: Target does not support the kernel CodeModel diff --git a/llvm/test/CodeGen/SPARC/codemodel.ll b/llvm/test/CodeGen/SPARC/codemodel.ll index fae56b8..68da48a 100644 --- a/llvm/test/CodeGen/SPARC/codemodel.ll +++ b/llvm/test/CodeGen/SPARC/codemodel.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=sparc64-unknown-linux -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=sparc64-unknown-linux -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL +; RUN: not llc -verify-machineinstrs -o - -mtriple=sparc64-unknown-linux -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY +; RUN: not llc -verify-machineinstrs -o - -mtriple=sparc64-unknown-linux -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL ; TINY: Target does not support the tiny CodeModel ; KERNEL: Target does not support the kernel CodeModel diff --git a/llvm/test/CodeGen/SystemZ/codemodel.ll b/llvm/test/CodeGen/SystemZ/codemodel.ll index a96a28a..4375366 100644 --- a/llvm/test/CodeGen/SystemZ/codemodel.ll +++ b/llvm/test/CodeGen/SystemZ/codemodel.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=s390x-linux-gnu -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY -; RUN: not --crash llc -verify-machineinstrs -o - -mtriple=s390x-linux-gnu -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL +; RUN: not llc -verify-machineinstrs -o - -mtriple=s390x-linux-gnu -code-model=tiny < %s 2>&1 | FileCheck %s --check-prefix=TINY +; RUN: not llc -verify-machineinstrs -o - -mtriple=s390x-linux-gnu -code-model=kernel < %s 2>&1 | FileCheck %s --check-prefix=KERNEL ; TINY: Target does not support the tiny CodeModel ; KERNEL: Target does not support the kernel CodeModel diff --git a/llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll b/llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll index 214c258..50f9df9 100644 --- a/llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll +++ b/llvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll @@ -1,5 +1,5 @@ -; RUN: not --crash llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics 2>&1 | FileCheck %s --check-prefix=ERROR -; RUN: not --crash llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics -fast-isel 2>&1 | FileCheck %s --check-prefix=ERROR +; RUN: not llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics 2>&1 | FileCheck %s --check-prefix=ERROR +; RUN: not llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics -fast-isel 2>&1 | FileCheck %s --check-prefix=ERROR ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics --mtriple wasm32-unknown-emscripten | FileCheck %s --check-prefixes=CHECK,TLS ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=+bulk-memory,atomics --mtriple wasm32-unknown-emscripten -fast-isel | FileCheck %s --check-prefixes=CHECK,TLS ; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -mattr=-bulk-memory,atomics | FileCheck %s --check-prefixes=CHECK,NO-TLS diff --git a/llvm/test/CodeGen/X86/codemodel.ll b/llvm/test/CodeGen/X86/codemodel.ll index 1d9818c..ea754ad 100644 --- a/llvm/test/CodeGen/X86/codemodel.ll +++ b/llvm/test/CodeGen/X86/codemodel.ll @@ -1,6 +1,6 @@ ; RUN: llc < %s -code-model=small | FileCheck -check-prefix CHECK-SMALL %s ; RUN: llc < %s -code-model=kernel | FileCheck -check-prefix CHECK-KERNEL %s -; RUN: not --crash llc < %s -code-model=tiny 2>&1 | FileCheck -check-prefix CHECK-TINY %s +; RUN: not llc < %s -code-model=tiny 2>&1 | FileCheck -check-prefix CHECK-TINY %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/MC/Mips/micromips64-unsupported.s b/llvm/test/MC/Mips/micromips64-unsupported.s index 05c4bc9..bc38cfb 100644 --- a/llvm/test/MC/Mips/micromips64-unsupported.s +++ b/llvm/test/MC/Mips/micromips64-unsupported.s @@ -1,8 +1,8 @@ -# RUN: not --crash llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6 -# RUN: not --crash llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6 +# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6 +# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64r6 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64R6 -# RUN: not --crash llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64 -# RUN: not --crash llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64 +# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64 +# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 -mattr=+micromips | FileCheck %s --check-prefix=64 # 64R6: microMIPS64R6 is not supported # 64: microMIPS64 is not supported diff --git a/llvm/test/MC/Mips/micromips64r6-unsupported.s b/llvm/test/MC/Mips/micromips64r6-unsupported.s index d2afff7..402e667 100644 --- a/llvm/test/MC/Mips/micromips64r6-unsupported.s +++ b/llvm/test/MC/Mips/micromips64r6-unsupported.s @@ -1,4 +1,4 @@ -# RUN: not --crash llvm-mc -filetype=obj -triple=mips64-unknown-linux -mattr=+micromips \ +# RUN: not llvm-mc -filetype=obj -triple=mips64-unknown-linux -mattr=+micromips \ # RUN: -mcpu=mips64r6 %s 2>&1 | FileCheck %s -check-prefix=CHECK-OPTION # RUN: not llvm-mc -filetype=obj -triple=mips64-unknown-linux -mcpu=mips64r6 \ # RUN: %s 2>&1 | FileCheck %s -check-prefix=CHECK-MM-DIRECTIVE diff --git a/llvm/test/Other/optimization-remarks-inline.ll b/llvm/test/Other/optimization-remarks-inline.ll index 3e51ac1..1ba9931 100644 --- a/llvm/test/Other/optimization-remarks-inline.ll +++ b/llvm/test/Other/optimization-remarks-inline.ll @@ -10,7 +10,7 @@ ; RUN: opt < %s -inline -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s ; RUN: opt < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s -; RUN: not --crash opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s +; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s define i32 @foo(i32 %x, i32 %y) #0 { entry: diff --git a/llvm/test/Transforms/BlockExtractor/invalid-block.ll b/llvm/test/Transforms/BlockExtractor/invalid-block.ll index 4b284dd..f444764 100644 --- a/llvm/test/Transforms/BlockExtractor/invalid-block.ll +++ b/llvm/test/Transforms/BlockExtractor/invalid-block.ll @@ -1,5 +1,5 @@ ; RUN: echo 'bar invalidbb' > %t -; RUN: not --crash opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s +; RUN: not opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s ; CHECK: Invalid block define void @bar() { diff --git a/llvm/test/Transforms/BlockExtractor/invalid-function.ll b/llvm/test/Transforms/BlockExtractor/invalid-function.ll index 9af46ef..4044815 100644 --- a/llvm/test/Transforms/BlockExtractor/invalid-function.ll +++ b/llvm/test/Transforms/BlockExtractor/invalid-function.ll @@ -1,5 +1,5 @@ ; RUN: echo 'foo bb' > %t -; RUN: not --crash opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s +; RUN: not opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s ; CHECK: Invalid function define void @bar() { diff --git a/llvm/test/Transforms/BlockExtractor/invalid-line.ll b/llvm/test/Transforms/BlockExtractor/invalid-line.ll index f0a4231..7e409d3 100644 --- a/llvm/test/Transforms/BlockExtractor/invalid-line.ll +++ b/llvm/test/Transforms/BlockExtractor/invalid-line.ll @@ -1,5 +1,5 @@ ; RUN: echo 'foo' > %t -; RUN: not --crash opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s +; RUN: not opt -S -extract-blocks -extract-blocks-file=%t %s 2>&1 | FileCheck %s ; CHECK: Invalid line define void @bar() { diff --git a/llvm/test/Transforms/GCOVProfiling/version.ll b/llvm/test/Transforms/GCOVProfiling/version.ll index 1cf5746..bfac255 100644 --- a/llvm/test/Transforms/GCOVProfiling/version.ll +++ b/llvm/test/Transforms/GCOVProfiling/version.ll @@ -7,7 +7,7 @@ ; RUN: opt -passes=insert-gcov-profiling -disable-output < %t/2 ; RUN: head -c8 %t/version.gcno | grep '^oncg.804' ; RUN: rm %t/version.gcno -; RUN: not --crash opt -passes=insert-gcov-profiling -default-gcov-version=asdfasdf -disable-output < %t/2 +; RUN: not opt -passes=insert-gcov-profiling -default-gcov-version=asdfasdf -disable-output < %t/2 ; RUN: opt -passes=insert-gcov-profiling -default-gcov-version='402*' -disable-output < %t/2 ; RUN: head -c8 %t/version.gcno | grep '^oncg.204' ; RUN: rm %t/version.gcno diff --git a/llvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll b/llvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll index e855ee8..0cc10bd 100644 --- a/llvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll +++ b/llvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll @@ -1,4 +1,4 @@ -; RUN: not --crash opt -loop-unroll -unroll-peel-count=2 -unroll-count=2 -S < %s 2>&1 | FileCheck %s +; RUN: not opt -loop-unroll -unroll-peel-count=2 -unroll-count=2 -S < %s 2>&1 | FileCheck %s ; CHECK: LLVM ERROR: Cannot specify both explicit peel count and explicit unroll count -- 2.7.4