[LLVMdev] Patterns with Multiple Stores
dag at cray.com
Mon Nov 17 12:28:27 PST 2008
I want to write a pattern that looks something like this:
def : Pat<(unalignedstore (v2f64 VR128:$src), addr:$dst),
(MOVSDmr ADD64ri8(addr:$dst, imm:8), ( SHUFPDrri (VR128:$src,
(MOVSDmr addr:$dst, FR64:$src))), imm:3)
So I want to convert an unaligned vector store to a scalar store, a shuffle
and a scalar store.
There are several question I have:
- Is the imm:3 syntax correct? Basically I want to hard-code the shuffle mask
- The first MOVSD doesn't really "feed" the SHUFPD. How do I write the
pattern to guarantee the MOVSD happens before the SHUFPD when the scheduler
does its thing?
- How do I hard-code the immediate add that updates the store address for the
high element? Again, I don't think imm:8 is right.
Is it possible to express this kind of thing in tblgen or do I have to write
More information about the llvm-dev