diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /test/CodeGen/R600/codegen-prepare-addrmode-sext.ll | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'test/CodeGen/R600/codegen-prepare-addrmode-sext.ll')
-rw-r--r-- | test/CodeGen/R600/codegen-prepare-addrmode-sext.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/R600/codegen-prepare-addrmode-sext.ll b/test/CodeGen/R600/codegen-prepare-addrmode-sext.ll new file mode 100644 index 0000000..f8b4a61 --- /dev/null +++ b/test/CodeGen/R600/codegen-prepare-addrmode-sext.ll @@ -0,0 +1,19 @@ +; RUN: opt -codegenprepare -S -o - %s | FileCheck --check-prefix=OPT --check-prefix=FUNC %s +; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-LLC --check-prefix=FUNC %s + +target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:32:32-p5:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64" +target triple = "r600--" + +; FUNC-LABEL: @test +; OPT: mul nsw i32 +; OPT-NEXT: sext +; SI-LLC: V_MUL_LO_I32 +; SI-LLC-NOT: V_MUL_HI +define void @test(i8 addrspace(1)* nocapture readonly %in, i32 %a, i8 %b) { +entry: + %0 = mul nsw i32 %a, 3 + %1 = sext i32 %0 to i64 + %2 = getelementptr i8 addrspace(1)* %in, i64 %1 + store i8 %b, i8 addrspace(1)* %2 + ret void +} |