BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(AArch64::BRK))
.addImm(1);
return true;
- case Intrinsic::debugtrap: {
- if (Subtarget->isTargetWindows()) {
- BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(AArch64::BRK))
- .addImm(0xF000);
- return true;
- }
- break;
- }
+ case Intrinsic::debugtrap:
+ BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(AArch64::BRK))
+ .addImm(0xF000);
+ return true;
case Intrinsic::sqrt: {
Type *RetTy = II->getCalledFunction()->getReturnType();
// Trap.
setOperationAction(ISD::TRAP, MVT::Other, Legal);
- if (Subtarget->isTargetWindows())
- setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal);
+ setOperationAction(ISD::DEBUGTRAP, MVT::Other, Legal);
// We combine OR nodes for bitfield operations.
setTargetDAGCombine(ISD::OR);
// __builtin_trap() uses the BRK instruction on AArch64.
def : Pat<(trap), (BRK 1)>;
-def : Pat<(debugtrap), (BRK 0xF000)>, Requires<[IsWindows]>;
+def : Pat<(debugtrap), (BRK 0xF000)>;
// Multiply high patterns which multiply the lower subvector using smull/umull
// and the upper subvector with smull2/umull2. Then shuffle the high the high
MIRBuilder.buildInstr(AArch64::BRK, {}, {}).addImm(1);
break;
case Intrinsic::debugtrap:
- if (!STI.isTargetWindows())
- return false;
MIRBuilder.buildInstr(AArch64::BRK, {}, {}).addImm(0xF000);
break;
}
; RUN: llc -mtriple=aarch64-windows %s -o -| FileCheck %s
; RUN: llc -mtriple=aarch64-windows -fast-isel %s -o - | FileCheck %s
; RUN: llc -mtriple=aarch64-windows -global-isel %s -o - | FileCheck %s
+; RUN: llc -mtriple=aarch64-linux-gnu %s -o -| FileCheck %s
+; RUN: llc -mtriple=arm64-apple-ios -global-isel %s -o - | FileCheck %s
+; RUN: llc -mtriple=arm64-apple-macosx -fast-isel %s -o - | FileCheck %s
; CHECK-LABEL: test1:
; CHECK: brk #0xf000