Request for reviews (M): 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
Vladimir Kozlov
vladimir.kozlov at oracle.com
Wed Aug 22 10:32:22 PDT 2012
http://cr.openjdk.java.net/~kvn/7192963/webrev
7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
An other variant of shifts with loop variant counts: "a[i]=1<<i;". C2 tried to
create PackINode for this case and failed because that code was broken. Pack
nodes are not supported (there are no Mach nodes) so the code was not tested
before. There is code in SuperWord::profitable() method which check for cases
where Pack node is needed and skip such vectorization. But it does not check it
for shift node count edge since it does not expect vector input for it.
The fix is to not vectorize shift instructions if count is not the same for all
shifts and if count is vector. Note, I removed the changes for previous 7192964
fix since it was not precise and current fix cover 7192964 case (I verified).
Also fixed Pack node generation, number of inputs should be 2 at the creation
otherwise it gives the bug's assert.
I did some refactoring. Moved and renamed SuperWord::vector_opd_range() to
VectorNode::vector_operands(). Opcode checks of supported nodes are done in
vectornode.cpp. Also this method was incorrect - it had only one LShiftI opcode
listed. And I added other supported nodes.
Thanks,
Vladimir
More information about the hotspot-compiler-dev
mailing list