1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/CodeGen/Hexagon/trap-crash.ll
Krzysztof Parzyszek 737cf5b17d [Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

This reapplies r354606 with a fix.

llvm-svn: 354611
2019-02-21 19:42:39 +00:00

21 lines
479 B
LLVM

; RUN: llc -march=hexagon < %s | FileCheck %s
; Generate code that is guaranteed to crash. At the moment, it's a
; misaligned load.
; CHECK: memd(##3134984174)
target triple = "hexagon"
; Function Attrs: noreturn nounwind
define i32 @f0() #0 {
entry:
tail call void @llvm.trap()
unreachable
}
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #1
attributes #0 = { noreturn nounwind "target-cpu"="hexagonv60" }
attributes #1 = { cold noreturn nounwind }