[LLVMbugs] [Bug 13961] New: [ARM, NEON] "cannot select" crash when using vector select instruction
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 27 18:50:55 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13961
Bug #: 13961
Summary: [ARM,NEON] "cannot select" crash when using vector
select instruction
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: matt at pharr.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
With this short program:
; ModuleID = '<stdin>'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
target triple = "arm-apple-darwin12.1.0"
define <4 x i32> @foo___UM_vyivyi(<4 x i32> %a, <4 x i32> %b) nounwind {
allocas:
%a.lobit15 = lshr <4 x i32> %a, <i32 31, i32 31, i32 31, i32 31>
%0 = and <4 x i32> %a.lobit15, <i32 1, i32 1, i32 1, i32 1>
%m1.i = icmp ne <4 x i32> %0, zeroinitializer
%v1.i = select <4 x i1> %m1.i, <4 x i32> %a, <4 x i32> %b
ret <4 x i32> %v1.i
}
I get a crash with top-of-tree if I compile as follows:
% llc -mcpu=cortex-a9 -mattr=+neon bug-1.ll
LLVM ERROR: Cannot select: 0x7fa9f8831810: v4i32 = vselect 0x7fa9f8830810,
0x7fa9f8830c10, 0x7fa9f8831510 [ORD=4] [ID=28]
0x7fa9f8830810: v4i32 = ARMISD::VTST 0x7fa9f8833a10, 0x7fa9f8831610 [ID=27]
0x7fa9f8833a10: v4i32 = ARMISD::VSHRu 0x7fa9f8830c10, 0x7fa9f8831010
[ID=26]
0x7fa9f8830c10: v4i32 = bitcast 0x7fa9f8831410 [ORD=1] [ID=25]
0x7fa9f8831410: v2f64 = ARMISD::BUILD_VECTOR 0x7fa9f8830010,
0x7fa9f8830510 [ID=24]
0x7fa9f8830010: f64 = ARMISD::VMOVDRR 0x7fa9f882fd10, 0x7fa9f882ff10
[ORD=1] [ID=21]
0x7fa9f882fd10: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f882fc10
[ORD=1] [ID=15]
0x7fa9f882fc10: i32 = Register %vreg0 [ORD=1] [ID=1]
0x7fa9f882ff10: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f882fe10
[ORD=1] [ID=16]
0x7fa9f882fe10: i32 = Register %vreg1 [ORD=1] [ID=2]
0x7fa9f8830510: f64 = ARMISD::VMOVDRR 0x7fa9f8830210, 0x7fa9f8830410
[ORD=1] [ID=22]
0x7fa9f8830210: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f8830110
[ORD=1] [ID=17]
0x7fa9f8830110: i32 = Register %vreg2 [ORD=1] [ID=3]
0x7fa9f8830410: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f8830310
[ORD=1] [ID=18]
0x7fa9f8830310: i32 = Register %vreg3 [ORD=1] [ID=4]
0x7fa9f8831010: i32 = Constant<31> [ORD=1] [ID=9]
0x7fa9f8831610: v4i32 = ARMISD::VMOVIMM 0x7fa9f8830f10 [ID=20]
0x7fa9f8830f10: i32 = TargetConstant<1> [ID=14]
0x7fa9f8830c10: v4i32 = bitcast 0x7fa9f8831410 [ORD=1] [ID=25]
0x7fa9f8831410: v2f64 = ARMISD::BUILD_VECTOR 0x7fa9f8830010, 0x7fa9f8830510
[ID=24]
0x7fa9f8830010: f64 = ARMISD::VMOVDRR 0x7fa9f882fd10, 0x7fa9f882ff10
[ORD=1] [ID=21]
0x7fa9f882fd10: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f882fc10
[ORD=1] [ID=15]
0x7fa9f882fc10: i32 = Register %vreg0 [ORD=1] [ID=1]
0x7fa9f882ff10: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f882fe10
[ORD=1] [ID=16]
0x7fa9f882fe10: i32 = Register %vreg1 [ORD=1] [ID=2]
0x7fa9f8830510: f64 = ARMISD::VMOVDRR 0x7fa9f8830210, 0x7fa9f8830410
[ORD=1] [ID=22]
0x7fa9f8830210: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f8830110
[ORD=1] [ID=17]
0x7fa9f8830110: i32 = Register %vreg2 [ORD=1] [ID=3]
0x7fa9f8830410: i32,ch = CopyFromReg 0x7fa9f8411220, 0x7fa9f8830310
[ORD=1] [ID=18]
0x7fa9f8830310: i32 = Register %vreg3 [ORD=1] [ID=4]
0x7fa9f8831510: v4i32 = bitcast 0x7fa9f8830610 [ID=23]
0x7fa9f8830610: v2f64,ch = load 0x7fa9f8411220, 0x7fa9f8830d10,
0x7fa9f8830e10<LD16[FixedStack-1](align=4)> [ID=19]
0x7fa9f8830d10: i32 = FrameIndex<-1> [ORD=4] [ID=7]
0x7fa9f8830e10: i32 = undef [ORD=4] [ID=8]
In function: foo___UM_vyivyi
(When fixed, it'd be nice if this was turned into a VBSL instruction..)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list