Skip to content

Commit 59d461f

Browse files
author
Aman Sharma
committed
added clang-format output
1 parent 515510f commit 59d461f

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7047,7 +7047,6 @@ bool AMDGPULegalizerInfo::legalizeDebugTrap(MachineInstr &MI,
70477047
return true;
70487048
}
70497049

7050-
70517050
bool AMDGPULegalizerInfo::legalizeUbsanTrap(MachineInstr &MI,
70527051
MachineRegisterInfo &MRI,
70537052
MachineIRBuilder &B) const {
@@ -7058,7 +7057,7 @@ bool AMDGPULegalizerInfo::legalizeUbsanTrap(MachineInstr &MI,
70587057
DiagnosticInfoUnsupported NoTrap(B.getMF().getFunction(),
70597058
"ubsantrap handler not supported",
70607059
MI.getDebugLoc(), DS_Warning);
7061-
LLVMContext &Ctx = B.getMF().getFunction().getContext();
7060+
LLVMContext &Ctx = B.getContext();
70627061
Ctx.diagnose(NoTrap);
70637062
} else {
70647063
// Insert trap instruction

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,8 @@ class AMDGPULegalizerInfo final : public LegalizerInfo {
244244
bool legalizeDebugTrap(MachineInstr &MI, MachineRegisterInfo &MRI,
245245
MachineIRBuilder &B) const;
246246

247-
248247
bool legalizeUbsanTrap(MachineInstr &MI, MachineRegisterInfo &MRI,
249-
MachineIRBuilder &B) const;
250-
248+
MachineIRBuilder &B) const;
251249

252250
bool legalizeIntrinsic(LegalizerHelper &Helper,
253251
MachineInstr &MI) const override;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc -mtriple=amdgcn-amd-amdhsa -global-isel < %s | FileCheck %s
3+
4+
define void @ubsan_trap() {
5+
; CHECK-LABEL: ubsan_trap:
6+
; CHECK: ; %bb.0:
7+
; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8+
; CHECK-NEXT: s_trap 2
9+
; CHECK-NEXT: s_setpc_b64 s[30:31]
10+
call void @llvm.ubsantrap(i8 0)
11+
ret void
12+
}
13+
declare void @llvm.ubsantrap(i8)

llvm/test/CodeGen/AMDGPU/ubsan_trap.ll

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)