The patch https://reviews.llvm.org/D34032 added exploitation for vector extract with variable index instructions. Under the case of extracting word element 1, using the MFVSRWZ is a better option since it does not requite an extra gpr input and requires no extra shuffles. Also added patterns for extracting to i32 rather than i64.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Other than the inline comment, LGTM
lib/Target/PowerPC/PPCInstrVSX.td | ||
---|---|---|
1909 | I just realized that we test different things for Power9 and pre-Power9. This should probably be fixed on the commit. |
I just realized that we test different things for Power9 and pre-Power9. This should probably be fixed on the commit.
What I mean is that we test for HasP9Altivec for deciding to use the VEXTU... instructions and test for NoP9Vector for deciding not to use them. Please unify these. If there are other uses of NoP9Vector that should continue to use that predicate, then just add another one NoP9Altivec. Otherwise, just change the existing one to that.