blob: 5851720926762beb15995edd0a9c66139d2770cd [file] [log] [blame]
Matt Arsenault5e740db2015-06-03 20:04:05 +00001; RUN: opt -mtriple=amdgcn-- -codegenprepare -S < %s | FileCheck -check-prefix=OPT %s
2; RUN: llc -march=amdgcn -mcpu=verde -verify-machineinstrs < %s | FileCheck -check-prefix=SI-LLC %s
Tom Stellard728d4172014-02-14 21:10:34 +00003
Matt Arsenault5e740db2015-06-03 20:04:05 +00004; OPT-LABEL: @test(
Quentin Colombet1627a412014-02-22 01:06:41 +00005; OPT: mul nsw i32
6; OPT-NEXT: sext
Matt Arsenault5e740db2015-06-03 20:04:05 +00007
Tom Stellard79243d92014-10-01 17:15:17 +00008; SI-LLC-LABEL: {{^}}test:
Tom Stellard326d6ec2014-11-05 14:50:53 +00009; SI-LLC: s_mul_i32
10; SI-LLC-NOT: mul
Tom Stellard728d4172014-02-14 21:10:34 +000011define void @test(i8 addrspace(1)* nocapture readonly %in, i32 %a, i8 %b) {
12entry:
13 %0 = mul nsw i32 %a, 3
14 %1 = sext i32 %0 to i64
David Blaikie79e6c742015-02-27 19:29:02 +000015 %2 = getelementptr i8, i8 addrspace(1)* %in, i64 %1
Tom Stellard728d4172014-02-14 21:10:34 +000016 store i8 %b, i8 addrspace(1)* %2
17 ret void
18}