diff options
author | Jyotsna Verma <jverma@codeaurora.org> | 2013-04-23 17:11:46 +0000 |
---|---|---|
committer | Jyotsna Verma <jverma@codeaurora.org> | 2013-04-23 17:11:46 +0000 |
commit | a696239becb97ce0ca3447835d7c8d29de319807 (patch) | |
tree | b42dcd01efb56a13d451792ad0aa88f03a5372fa /llvm/test | |
parent | d3c90e132a15fe61450315c5b7bee547b0fb09a8 (diff) | |
download | bcm5719-llvm-a696239becb97ce0ca3447835d7c8d29de319807.tar.gz bcm5719-llvm-a696239becb97ce0ca3447835d7c8d29de319807.zip |
Hexagon: Remove duplicate instructions to handle global/immediate values
for absolute/absolute-set addressing modes.
llvm-svn: 180120
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/Hexagon/absimm.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/absimm.ll b/llvm/test/CodeGen/Hexagon/absimm.ll new file mode 100644 index 00000000000..b8f5edc2647 --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/absimm.ll @@ -0,0 +1,18 @@ +; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s +; Check that we generate absolute addressing mode instructions +; with immediate value. + +define i32 @f1(i32 %i) nounwind { +; CHECK: memw(##786432){{ *}}={{ *}}r{{[0-9]+}} +entry: + store volatile i32 %i, i32* inttoptr (i32 786432 to i32*), align 262144 + ret i32 %i +} + +define i32* @f2(i32* nocapture %i) nounwind { +entry: +; CHECK: r{{[0-9]+}}{{ *}}={{ *}}memw(##786432) + %0 = load volatile i32* inttoptr (i32 786432 to i32*), align 262144 + %1 = inttoptr i32 %0 to i32* + ret i32* %1 + } |