Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/superword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@ const Type* VLoopTypes::container_type(Node* n) const {
// Float to half float conversion may be succeeded by a conversion from
// half float to float, in such a case back propagation of narrow type (SHORT)
// may not be possible.
if (n->Opcode() == Op_ConvF2HF) {
if (n->Opcode() == Op_ConvF2HF || n->Opcode() == Op_ReinterpretHF2S) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this relevant, or does that belong to a different (vector) RFE?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sure to assign a SHORT container type to the ReinterpretHF2S node which could be succeeded by a ConvHF2F IR which expects its inputs to be of SHORT type. During early phase of SLP extraction we get into a control flow querying the implemented vector IR opcode through split_packs_only_implemented_with_smaller_size
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/vectornode.cpp#L1446

This scenario is tested by following JTREG
test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorConvChain.java

return TypeInt::SHORT;
}
// A narrow type of arithmetic operations will be determined by
Expand Down