Add patterns to avoid inserting unnecessary zeroing shuffles.
Details
- Reviewers
spatel ab andreadb mkuper - Commits
- rG6199b4fd49af: [X86][SSE] Improve awareness of (v)cvtpd2ps implicit zeroing of upper 64-bits…
rG7b09af193a22: [X86][SSE] Improve awareness of fptrunc implicit zeroing of upper 64-bits of…
rL280249: [X86][SSE] Improve awareness of (v)cvtpd2ps implicit zeroing of upper 64-bits…
rL280214: [X86][SSE] Improve awareness of fptrunc implicit zeroing of upper 64-bits of…
Diff Detail
- Repository
- rL LLVM
Event Timeline
Thanks Simon.
lib/Target/X86/X86InstrSSE.td | ||
---|---|---|
2285 ↗ | (On Diff #68972) | I've only now realized we represent zeroing the two high lanes of a v4f32 with (v4f32 (bitconvert (X86vzmovl (v2f64 (bitconvert (v4f32 ...)))))) :-\ |
lib/Target/X86/X86IntrinsicsInfo.h | ||
1887 ↗ | (On Diff #68972) | This (and the change to the intrinsic test) can be a separate commit, right? |
lib/Target/X86/X86InstrSSE.td | ||
---|---|---|
2285 ↗ | (On Diff #68972) | Not much - we use VZEXT_MOVL to zero all but the first vector element. An alternative would be to have VZEXT32_MOVL and VZEXT64_MOVL (or something similar) - it would affect a lot of existing lowering patterns and I'm it sure its worth it. We have a number of similar bitcasting pattern situation. |
lib/Target/X86/X86IntrinsicsInfo.h | ||
1887 ↗ | (On Diff #68972) | Not reason at all - I'll update it. And yes these could be separate commits. |
lib/Target/X86/X86InstrSSE.td | ||
---|---|---|
2285 ↗ | (On Diff #68972) |
Sorry that should say "and I'm not sure its worth it." |
LGTM.
lib/Target/X86/X86InstrSSE.td | ||
---|---|---|
2285 ↗ | (On Diff #68972) | Even if we had VZEXT64_MOVL, it wouldn't help (at least, not with what bothers me), we'd still have the ugly casting back and forth. |