[PATCH] D41908: [X86][MMX] Add support for MMX zero vector creation
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 07:04:40 PST 2018
RKSimon added a comment.
In https://reviews.llvm.org/D41908#972788, @efriedma wrote:
> > Wouldn't we already need/have handling for a zeroinitializer constant of x86_mmx type?
>
> From LangRef: "There are no arrays, vectors or constants of this type."
Yes, we can't attach constants to the x86_mmx type, hence having to alias it via MMX_MOVW2D
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:8964
Ty = VectorType::get(Type::getInt32Ty(MF.getFunction().getContext()), 8);
+ else if (Opc == X86::MMX_SET0)
+ Ty = VectorType::get(Type::getInt32Ty(MF.getFunction().getContext()), 2);
----------------
RKSimon wrote:
> craig.topper wrote:
> > Do the test cases cover this?
> No I don't think they do. Any suggestions on suitable tests? I'm a little unclear as to when this kicks in given that the zero registers are all flagged as isReMaterializable.
I still haven't been able to cause this to fire, copying the approach from fold-pcmpeqd-2.ll doesn't seem to work - maybe just drop this part or add an assertion/unreachable?
Repository:
rL LLVM
https://reviews.llvm.org/D41908
More information about the llvm-commits
mailing list