[Hexagon] Reapply 238772 OSABI was not correctly set, added empty_elf test to make...
[oota-llvm.git] / test / CodeGen / R600 / codegen-prepare-addrmode-sext.ll
1 ; RUN: opt -codegenprepare -S -o - %s | FileCheck --check-prefix=OPT %s
2 ; RUN: llc < %s -march=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=SI-LLC %s
3
4 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"
5 target triple = "r600--"
6
7 ; OPT-LABEL: @test
8 ; OPT: mul nsw i32
9 ; OPT-NEXT: sext
10 ; SI-LLC-LABEL: {{^}}test:
11 ; SI-LLC: s_mul_i32
12 ; SI-LLC-NOT: mul
13 define void @test(i8 addrspace(1)* nocapture readonly %in, i32 %a, i8 %b) {
14 entry:
15   %0 = mul nsw i32 %a, 3
16   %1 = sext i32 %0 to i64
17   %2 = getelementptr i8, i8 addrspace(1)* %in, i64 %1
18   store i8 %b, i8 addrspace(1)* %2
19   ret void
20 }