11; RUN: llc < %s -march=nvptx -mcpu=sm_20 -verify-machineinstrs -trap-unreachable=false \
2- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-NOTRAP
2+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-NOTRAP
33; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs -trap-unreachable=false \
4- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-NOTRAP
4+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-NOTRAP
55; RUN: llc < %s -march=nvptx -mcpu=sm_20 -verify-machineinstrs -trap-unreachable -no-trap-after-noreturn \
6- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-NOTRAP
6+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-NOTRAP
77; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs -trap-unreachable -no-trap-after-noreturn \
8- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-NOTRAP
8+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-NOTRAP
99; RUN: llc < %s -march=nvptx -mcpu=sm_20 -verify-machineinstrs -trap-unreachable -no-trap-after-noreturn=false \
10- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-TRAP
10+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-TRAP
1111; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs -trap-unreachable -no-trap-after-noreturn=false \
12- ; RUN: | FileCheck %s --check-prefix =CHECK --check-prefix= CHECK-TRAP
13- ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs -mattr=+ptx75 \
14- ; RUN: | FileCheck %s --check-prefixes =CHECK-BUG-FIXED
12+ ; RUN: | FileCheck %s --check-prefixes =CHECK, CHECK-TRAP
13+ ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs -trap-unreachable - mattr=+ptx83 \
14+ ; RUN: | FileCheck %s --check-prefix =CHECK-BUG-FIXED
1515; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -march=nvptx -mcpu=sm_20 -verify-machineinstrs | %ptxas-verify %}
1616; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 -verify-machineinstrs | %ptxas-verify %}
1717
@@ -26,21 +26,26 @@ define void @kernel_func() {
2626 call void @throw ()
2727; CHECK-TRAP-NOT: exit;
2828; CHECK-TRAP: trap;
29+
2930; CHECK-NOTRAP-NOT: trap;
3031; CHECK: exit;
32+
3133; CHECK-BUG-FIXED-NOT: exit;
34+ ; CHECK-BUG-FIXED: trap;
3235 unreachable
3336}
3437
3538; CHECK-LABEL: kernel_func_2
3639define void @kernel_func_2 () {
3740; CHECK: trap; exit;
38- ; CHECK-BUG-FIXED-NOT: exit;
41+ ; CHECK-BUG-FIXED: trap;
42+ ; CHECK-BUG-FIXED-NOT: trap; exit;
3943 call void @llvm.trap ()
4044
4145;; Make sure we avoid emitting two trap instructions.
4246; CHECK-NOT: trap;
4347; CHECK-NOT: exit;
48+ ; CHECK-BUG-FIXED-NOT: trap;
4449 unreachable
4550}
4651
0 commit comments