2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_merge_values.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target
---
name: g_merge_values
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_phi.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#RUN: not --crash llc -o - -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
#RUN: not llc -o - -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target
--- |
; ModuleID = 'test.ll'
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_ptr_add.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#RUN: not --crash llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
#RUN: not llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_ptrtoint.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#RUN: not --crash llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
#RUN: not llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_select.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#RUN: not --crash llc -march=aarch64 -run-pass=none -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s
#RUN: not llc -march=aarch64 -run-pass=none -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_sext_inreg.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# RUN: not llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

--- |
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_sextload.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_shuffle_vector.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target
---
name: g_shuffle_vector
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_store.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_trunc.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_g_zextload.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=arm64 -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: global-isel, aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_memccpy_intrinsics.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - -march=aarch64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# RUN: not llc -o - -march=aarch64 -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/test_phis_precede_nonphis.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -run-pass=machineverifier %s -o - 2>&1 | FileCheck %s
# RUN: not llc -run-pass=machineverifier %s -o - 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target

--- |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# RUN: not llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# REQUIRES: x86-registered-target

# CHECK: Bad machine code: Generic extend/truncate can not operate on pointers
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verifier-generic-types-1.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# RUN: not llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# REQUIRES: x86-registered-target

# CHECK-NOT: Type mismatch
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verifier-generic-types-2.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# RUN: not llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# REQUIRES: x86-registered-target

# CHECK: Bad machine code: Generic instruction is missing a virtual register type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck -check-prefix=ERROR %s
# RUN: not llc -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -o /dev/null %s 2>&1 | FileCheck -check-prefix=ERROR %s
# REQUIRES: amdgpu-registered-target

# When the verifier was detecting the invalid liveness for vcc, it would assert when trying to iterate the subregisters of the implicit virtual register use.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verifier-phi-fail0.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# RUN: not llc -o - %s -mtriple=x86_64-- -verify-machineinstrs -run-pass=none 2>&1 | FileCheck %s
# REQUIRES: x86-registered-target

---
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verifier-pseudo-terminators.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -march=amdgcn -run-pass=verify -o - %s 2>&1 | FileCheck %s
# RUN: not llc -march=amdgcn -run-pass=verify -o - %s 2>&1 | FileCheck %s
# REQUIRES: amdgpu-registered-target

# Make sure that mismatched successors are caught when a _term
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verify-regbankselected.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# RUN: not llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target

--- |
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verify-regops.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -march=x86 -o - %s -run-pass=none -verify-machineinstrs \
# RUN: not llc -march=x86 -o - %s -run-pass=none -verify-machineinstrs \
# RUN: 2>&1 | FileCheck %s
# REQUIRES: x86-registered-target
#
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/MachineVerifier/verify-selected.mir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RUN: not --crash llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# RUN: not llc -verify-machineinstrs -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
# REQUIRES: aarch64-registered-target

--- |
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Object/coff-invalid.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SECTIONS-NEXT: Name: .text (2E 74 65 78 74 00 00 00)
SECTIONS-NEXT: VirtualSize: 0x0
SECTIONS-NEXT: VirtualAddress: 0x1000000

RUN: not --crash llvm-readobj -r %p/Inputs/invalid-bad-section-address.coff 2>&1 | \
RUN: not llvm-readobj -r %p/Inputs/invalid-bad-section-address.coff 2>&1 | \
RUN: FileCheck %s

CHECK: Sections with relocations should have an address of 0
4 changes: 2 additions & 2 deletions llvm/test/Object/elf-invalid-phdr.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# - Section: .text
#
# Then editing the e_phoff in with a hexeditor to set it to 0xffffff
RUN: not --crash llvm-objdump -private-headers %p/Inputs/invalid-phdr.elf 2>&1 \
RUN: not llvm-objdump -private-headers %p/Inputs/invalid-phdr.elf 2>&1 \
RUN: | FileCheck %s

CHECK: LLVM ERROR: program headers are longer than binary of size 4162: e_phoff = 0xffffff, e_phnum = 1, e_phentsize = 56
CHECK: LLVM ERROR: program headers are longer than binary of size 4162: e_phoff = 0xffffff, e_phnum = 1, e_phentsize = 56
2 changes: 1 addition & 1 deletion llvm/test/Object/invalid.test
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Sections:
## when instead of expected SHT_RELA section it locates a section of a different type.

# RUN: yaml2obj %s --docnum=3 -o %t3
# RUN: not --crash llvm-dwarfdump -debug-line %t3 2>&1 | FileCheck --check-prefix=RELA %s
# RUN: not llvm-dwarfdump -debug-line %t3 2>&1 | FileCheck --check-prefix=RELA %s

# RELA: LLVM ERROR: Section is not SHT_RELA

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Object/wasm-invalid-file.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RUN: yaml2obj %s -o %t.wasm
# RUN: echo -e -n "\x01" >> %t.wasm
# Append a new section but truncate the encoding of the section size
# RUN: not --crash llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE
# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-LEB-DECODE

!WASM
FileHeader:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Object/wasm-string-outside-section.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RUN: not --crash llvm-objdump -s %p/Inputs/WASM/string-outside-section.wasm 2>&1 | FileCheck %s
RUN: not llvm-objdump -s %p/Inputs/WASM/string-outside-section.wasm 2>&1 | FileCheck %s

CHECK: LLVM ERROR: EOF while reading string
13 changes: 13 additions & 0 deletions llvm/test/Other/close-stderr.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
; RUN: sh -c 'opt --reject-this-option 2>&-; echo $?; opt -o /dev/null /dev/null 2>&-; echo $?;' \
; RUN: | FileCheck %s

; CHECK: {{^1$}}
; On valgrind, we got 127 here.
; XFAIL: valgrind

; CHECK: {{^0$}}
; XFAIL: vg_leak
; REQUIRES: shell

; Test that the error handling when writing to stderr fails exits the
; program cleanly rather than aborting.
2 changes: 1 addition & 1 deletion llvm/test/Other/optimization-remarks-inline.ll
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/TableGen/HwModeSelect.td
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: not --crash llvm-tblgen -gen-dag-isel -I %p/../../include %s 2>&1 | FileCheck %s
// RUN: not llvm-tblgen -gen-dag-isel -I %p/../../include %s 2>&1 | FileCheck %s

// The HwModeSelect class is intended to serve as a base class for other
// classes that are then used to select a value based on the HW mode.
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/BlockExtractor/invalid-block.ll
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/BlockExtractor/invalid-function.ll
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/BlockExtractor/invalid-line.ll
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/FunctionImport/not-prevailing.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: opt -module-summary %s -o %t1.bc
; RUN: opt -module-summary -o %t2.bc %S/Inputs/not-prevailing.ll
; RUN: not --crash llvm-lto2 run -o %t3.bc %t1.bc %t2.bc -r %t1.bc,bar,px \
; RUN: not llvm-lto2 run -o %t3.bc %t1.bc %t2.bc -r %t1.bc,bar,px \
; RUN: -r %t1.bc,foo,x -r %t2.bc,foo,x -save-temps 2>&1 | FileCheck %s

; CHECK: Interposable and available_externally/linkonce_odr/weak_odr symbol
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Transforms/GCOVProfiling/version.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
; RUN: opt -insert-gcov-profiling -disable-output < %t/2
; RUN: head -c8 %t/version.gcno | grep '^oncg.204'
; RUN: rm %t/version.gcno
; RUN: not --crash opt -insert-gcov-profiling -default-gcov-version=asdfasdf -disable-output < %t/2
; RUN: not opt -insert-gcov-profiling -default-gcov-version=asdfasdf -disable-output < %t/2
; RUN: opt -insert-gcov-profiling -default-gcov-version=407* -disable-output < %t/2
; RUN: head -c8 %t/version.gcno | grep '^oncg.704'
; RUN: rm %t/version.gcno

; RUN: opt -passes=insert-gcov-profiling -disable-output < %t/2
; RUN: head -c8 %t/version.gcno | grep '^oncg.204'
; 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=407* -disable-output < %t/2
; RUN: head -c8 %t/version.gcno | grep '^oncg.704'
; RUN: rm %t/version.gcno
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Transforms/InstCombine/limit-max-iterations.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; RUN: opt < %s -instcombine --instcombine-max-iterations=0 -S | FileCheck %s --check-prefix=ZERO
; RUN: opt < %s -instcombine --instcombine-max-iterations=1 -S | FileCheck %s --check-prefix=ONE
; RUN: opt < %s -instcombine -S | FileCheck %s --check-prefix=FIXPOINT
; RUN: not --crash opt < %s -instcombine -S --instcombine-infinite-loop-threshold=3 2>&1 | FileCheck %s --check-prefix=LOOP
; RUN: not opt < %s -instcombine -S --instcombine-infinite-loop-threshold=3 2>&1 | FileCheck %s --check-prefix=LOOP

; Based on xor-of-icmps-with-extra-uses.ll. This requires multiple iterations of
; InstCombine to reach a fixpoint.
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-lto2/X86/pipeline.ll
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ define void @patatino() {
; CUSTOM-NEXT: }

; Check that invalid pipelines are caught as errors.
; RUN: not --crash llvm-lto2 run %t1.bc -o %t.o \
; RUN: not llvm-lto2 run %t1.bc -o %t.o \
; RUN: -r %t1.bc,patatino,px -opt-pipeline foogoo 2>&1 | \
; RUN: FileCheck %s --check-prefix=ERR

; ERR: LLVM ERROR: unable to parse pass pipeline description 'foogoo': unknown pass name 'foogoo'

; RUN: not --crash llvm-lto2 run %t1.bc -o %t.o \
; RUN: not llvm-lto2 run %t1.bc -o %t.o \
; RUN: -r %t1.bc,patatino,px -aa-pipeline patatino \
; RUN: -opt-pipeline loweratomic 2>&1 | \
; RUN: FileCheck %s --check-prefix=AAERR
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-readobj/COFF/arm64-many-epilogs.s
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: aarch64-registered-target
// RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o - \
// RUN: | not --crash llvm-readobj --unwind - 2>&1 | FileCheck %s
// RUN: | not llvm-readobj --unwind - | FileCheck %s

// Older versions of LLVM had a bug where we would accidentally
// truncate the number of epilogue scopes to a uint8_t; make
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-readobj/COFF/arm64-win-error2.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// REQUIRES: aarch64-registered-target
// RUN: llvm-mc -filetype=obj -triple aarch64-windows %s -o - \
// RUN: | not --crash llvm-readobj --unwind - 2>&1 | FileCheck %s
// RUN: | not llvm-readobj --unwind - 2>&1 | FileCheck %s

// CHECK: LLVM ERROR: Malformed unwind data

Expand Down