Krzysztof Parzyszek | 046090d | 2018-03-12 14:01:28 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -O3 < %s |
| 2 | ; REQUIRES: asserts |
| 3 | |
| 4 | ; Test that the compiler doesn't assert when attempting to |
| 5 | ; generate a store absolute set insturction where the base |
| 6 | ; register and destination register are same. |
| 7 | |
| 8 | target triple = "hexagon-unknown--elf" |
| 9 | |
| 10 | %s.0 = type { %s.1, %s.2 } |
| 11 | %s.1 = type { %s.1*, %s.1* } |
| 12 | %s.2 = type { %s.3 } |
| 13 | %s.3 = type { %s.4 } |
| 14 | %s.4 = type { %s.5, i32, i32, i8* } |
| 15 | %s.5 = type { i32 } |
| 16 | |
| 17 | @g0 = external global %s.0, align 4 |
| 18 | |
| 19 | ; Function Attrs: nounwind |
| 20 | define void @f0() #0 section ".init.text" { |
| 21 | b0: |
| 22 | store %s.1* getelementptr inbounds (%s.0, %s.0* @g0, i32 0, i32 0), %s.1** getelementptr inbounds (%s.0, %s.0* @g0, i32 0, i32 0, i32 0), align 4 |
| 23 | store %s.1* getelementptr inbounds (%s.0, %s.0* @g0, i32 0, i32 0), %s.1** getelementptr inbounds (%s.0, %s.0* @g0, i32 0, i32 0, i32 1), align 4 |
| 24 | ret void |
| 25 | } |
| 26 | |
| 27 | attributes #0 = { nounwind "target-cpu"="hexagonv55" } |