The MSP430 only has 1-bit shifts. In the lowering code, I would like to create a small loop to do multiple bit shifts. I assume that I have to create a new basic block, and figure out the chain stuff. Is there code in some backend, or generic lowering support, that does a similar thing? Could someone point me to it? thanks, bagel
Hello> The MSP430 only has 1-bit shifts. In the lowering code, I would like to create > a small loop to do multiple bit shifts. I assume that I have to create a new > basic block, and figure out the chain stuff.This might be tricky in general. Why cannot you just emit a libcall? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
On Sep 27, 2009, at 3:05 PMPDT, Bagel wrote:> The MSP430 only has 1-bit shifts. In the lowering code, I would > like to create > a small loop to do multiple bit shifts. I assume that I have to > create a new > basic block, and figure out the chain stuff. > > Is there code in some backend, or generic lowering support, that > does a similar > thing? Could someone point me to it?It doesn't work exactly like that, but see the handling of ATOMICs on PPC.
Maybe Matching Threads
- Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
- [LLVMdev] [Target] Custom Lowering expansion of 32-bit ISD::SHL, ISD::SHR without barrel shifter
- [LLVMdev] memory-to-memory instructions
- [LLVMdev] [Target] Custom Lowering expansion of 32-bit ISD::SHL, ISD::SHR without barrel shifter
- Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL