Krzysztof Parzyszek | 5ba1382 | 2017-06-07 20:04:33 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -debug-only=commgep 2>&1 < %s | FileCheck %s |
| 2 | ; REQUIRES: asserts |
| 3 | |
| 4 | ; We should generate new GEPs with "inbounds" flag. |
| 5 | ; CHECK: new GEP:{{.*}}inbounds |
| 6 | ; CHECK: new GEP:{{.*}}inbounds |
| 7 | |
| 8 | target triple = "hexagon" |
| 9 | |
| 10 | %struct.0 = type { i16, i16 } |
| 11 | |
| 12 | ; Function Attrs: nounwind |
Krzysztof Parzyszek | cf3ad58 | 2018-01-24 17:48:11 +0000 | [diff] [blame] | 13 | define i16 @TraceBack(%struct.0* %t) #0 { |
Krzysztof Parzyszek | 5ba1382 | 2017-06-07 20:04:33 +0000 | [diff] [blame] | 14 | entry: |
Krzysztof Parzyszek | cf3ad58 | 2018-01-24 17:48:11 +0000 | [diff] [blame] | 15 | %p = getelementptr inbounds %struct.0, %struct.0* %t, i32 0, i32 0 |
Krzysztof Parzyszek | 5ba1382 | 2017-06-07 20:04:33 +0000 | [diff] [blame] | 16 | %a = load i16, i16* %p |
| 17 | ret i16 %a |
| 18 | } |
| 19 | |
Sumanth Gundapaneni | e1983bc | 2017-10-18 18:07:07 +0000 | [diff] [blame] | 20 | attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" } |