[LLVMdev] vectorize a def-use chain (original) (raw)
Frank Winter fwinter at jlab.org
Wed Jul 8 15🔞03 PDT 2015
- Previous message: [LLVMdev] LLVM loop vectorizer
- Next message: [LLVMdev] vectorize a def-use chain
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'd like to replace scalar instructions with vector instructions such that the code corresponding to following tree would be vectorized:
load0 load1 \ / \ / add/sub/mul | | store
I had unsuccessful encounters with load0->replaceAllUsesWith(vec_load0) complaining about mismatching type (makes sense, add's other operand is still scalar at that time..)
Is the only way to create a vectorized version of this tree by
- creating the vector loads vec_load0 AND vec_load1
- retrieving the opcode of the arithmetic instruction and create a new one according to the opcode
How is step 2) in donepractice? Cloning the instruction and replacing the operands? (would that bypass the type checking for a moment?)
Thanks, Frank
- Previous message: [LLVMdev] LLVM loop vectorizer
- Next message: [LLVMdev] vectorize a def-use chain
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]