blob: 2c15c1a943bad58e5f711080e813592786d171b2 [file] [log] [blame]
Will Dietz5cb7f4e2013-10-14 16:57:17 +00001; REQUIRES: asserts
Cong Houf9f9ffb2015-09-18 18:19:40 +00002; RUN: llc < %s -mtriple=thumbv7-apple-ios -disable-ifcvt-diamond -stats 2>&1 | FileCheck %s
Will Dietz5cb7f4e2013-10-14 16:57:17 +00003; Evaluate the two vld1.8 instructions in separate MBB's,
4; instead of stalling on one and conditionally overwriting its result.
Cong Houf9f9ffb2015-09-18 18:19:40 +00005;
6; Update: After if-conversion the two vld1.8 instructions are in the same MBB
7; again. So we disable this if-conversion to eliminate its influence to this
8; test.
Will Dietz5cb7f4e2013-10-14 16:57:17 +00009
Cong Houf9f9ffb2015-09-18 18:19:40 +000010; CHECK-NOT: Number of pipeline stalls
Will Dietz5cb7f4e2013-10-14 16:57:17 +000011define <16 x i8> @multiselect(i32 %avail, i8* %foo, i8* %bar) {
12entry:
Jeroen Ketemaab99b592015-09-30 10:56:37 +000013 %vld1 = call <16 x i8> @llvm.arm.neon.vld1.v16i8.p0i8(i8* %foo, i32 1)
14 %vld2 = call <16 x i8> @llvm.arm.neon.vld1.v16i8.p0i8(i8* %bar, i32 1)
Daniel Jaspera73f3d52015-04-15 06:24:07 +000015 %and = and i32 %avail, 3
Will Dietz5cb7f4e2013-10-14 16:57:17 +000016 %tobool = icmp eq i32 %and, 0
17 %retv = select i1 %tobool, <16 x i8> %vld1, <16 x i8> %vld2
18 ret <16 x i8> %retv
19}
20
Jeroen Ketemaab99b592015-09-30 10:56:37 +000021declare <16 x i8> @llvm.arm.neon.vld1.v16i8.p0i8(i8* , i32 )