You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some times we need to do single-operand vector shuffling. LLVM uses the form shuffle(v, undef / poison, mask), while CIR currently uses shuffle(v, v, mask) as we don't have equivalent for undef / poison. This causes different emissions of IR. Not very critical problem though.
A direct approach will be add one equivalent. In #628 Bruno mentioned that
Btw, it's possible we might need an undef attribute someday, but up to now we should be good without one!
The other approaches include unifying the two forms in CIR with canonicalization (or at least something similar). Open for other ideas.
The text was updated successfully, but these errors were encountered:
As to VecShuffleOp, it's just just implementation
Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask,
const Twine &Name = "")
in LLVM.
Of course as you mention, LLVM has the following wrapper that is used more often.
/// Create a unary shuffle. The second vector operand of the IR instruction
/// is poison.
Value *CreateShuffleVector(Value *V, ArrayRef Mask,
const Twine &Name = "")
Yeah, if in future, we found majority cases for VecShuffleOp for its second Arg is poision, then we be we should consider
this unary shuffle op.
Mentioned in #613 .
Some times we need to do single-operand vector shuffling. LLVM uses the form
shuffle(v, undef / poison, mask)
, while CIR currently usesshuffle(v, v, mask)
as we don't have equivalent forundef
/poison
. This causes different emissions of IR. Not very critical problem though.A direct approach will be add one equivalent. In #628 Bruno mentioned that
The other approaches include unifying the two forms in CIR with canonicalization (or at least something similar). Open for other ideas.
The text was updated successfully, but these errors were encountered: