The AArch64 backend will use legal BUILDVECTORs for zero vectors or all-ones vectors, so during selection tablegen patterns get rely on immAllZerosV and immAllOnesV pattern frags in patters like vnot. It was not always consistent though, which this patch attempt to fix by recognizing where constant splat + insert vector element is used. The main outcome of this will be that full vector movi v0.2d, #0000000000000000 will be used as opposed to movi d0, #0, as per https://reviews.llvm.org/D53579. This helps simplify what tablegen will see, to make pattern matching simpler.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks sensible to me! I just had one minor comment ...
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
12449 | Instead of asking this question for the build vector Vec can you just instead test ConstantValue for 0 or 1 instead, since it's probably cheaper? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
12449 | Zero's are simple, but all-ones are a little more complex due to promotion of the constants to 32bits. |
Instead of asking this question for the build vector Vec can you just instead test ConstantValue for 0 or 1 instead, since it's probably cheaper?