summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/trap-crash.ll
blob: e940d98b620c57d637a64c829d917d3d9d4bbc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; 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 }
OpenPOWER on IntegriCloud