Skip to content
Merged
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
4 changes: 2 additions & 2 deletions lib/SPIRV/OCLToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ void OCLToSPIRVBase::visitCallInst(CallInst &CI) {
return;
}
if (DemangledName == kOCLBuiltinName::Dot &&
(CI.getOperand(0)->getType()->isFloatTy() ||
CI.getOperand(1)->getType()->isDoubleTy())) {
(!CI.getOperand(0)->getType()->isVectorTy() &&
!CI.getOperand(0)->getType()->isIntegerTy())) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wondering if just CI.getOperand(0)->getType()->isFPOrFPVectorTy() is sufficient?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From what I understand this visitCallDot is meant to translate dot with scalar floating point arguments (but not vectors) into FMul. Because of that FPVectors shouldn't pass this check but instead stay as calls to dot.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isFloatingPointTy()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that might be a good idea

visitCallDot(&CI);
return;
}
Expand Down