diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-06-07 20:04:33 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-06-07 20:04:33 +0000 |
| commit | 5ba13825f090348e1a02f697a7c15521ea684a77 (patch) | |
| tree | f2c644f45166a4a04718be5ec306d80f67f9d72e /llvm/test/CodeGen | |
| parent | d95df1339925a8992235ecbfc997c2f32dede3eb (diff) | |
| download | bcm5719-llvm-5ba13825f090348e1a02f697a7c15521ea684a77.tar.gz bcm5719-llvm-5ba13825f090348e1a02f697a7c15521ea684a77.zip | |
[Hexagon] Generate 'inbounds' GEPs in HexagonCommonGEP
llvm-svn: 304937
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/Hexagon/common-gep-inbounds.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/common-gep-inbounds.ll b/llvm/test/CodeGen/Hexagon/common-gep-inbounds.ll new file mode 100644 index 00000000000..a8b75725a0b --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/common-gep-inbounds.ll @@ -0,0 +1,20 @@ +; 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 +define i16 @TraceBack() #0 { +entry: + %p = getelementptr inbounds %struct.0, %struct.0* undef, i32 0, i32 0 + %a = load i16, i16* %p + ret i16 %a +} + +attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="-hvx-double,-long-calls" } |

