2017-06-08 04:04:33 +08:00
|
|
|
; RUN: llc -march=hexagon -debug-only=commgep 2>&1 < %s | FileCheck %s
|
|
|
|
; REQUIRES: asserts
|
|
|
|
|
|
|
|
; We should generate new GEPs with "inbounds" flag.
|
|
|
|
; CHECK: new GEP:{{.*}}inbounds
|
|
|
|
; CHECK: new GEP:{{.*}}inbounds
|
|
|
|
|
|
|
|
target triple = "hexagon"
|
|
|
|
|
|
|
|
%struct.0 = type { i16, i16 }
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
2018-01-25 01:48:11 +08:00
|
|
|
define i16 @TraceBack(%struct.0* %t) #0 {
|
2017-06-08 04:04:33 +08:00
|
|
|
entry:
|
2018-01-25 01:48:11 +08:00
|
|
|
%p = getelementptr inbounds %struct.0, %struct.0* %t, i32 0, i32 0
|
2017-06-08 04:04:33 +08:00
|
|
|
%a = load i16, i16* %p
|
|
|
|
ret i16 %a
|
|
|
|
}
|
|
|
|
|
2017-10-19 02:07:07 +08:00
|
|
|
attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }
|