[llvm-dev] REG_SEQUENCE use question

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 22 14:35:02 PDT 2017


On 3/22/2017 3:15 PM, Peter Bel via llvm-dev wrote:
> Yes, that will hold for the reg copy. But what about copying an
> immediate? Or subdividing one wide reg into two standard to run some math?

You can have a Pat that will convert an immediate into a value in a 
register. For example (from HexagonPatterns.td):

def: Pat<(s32_0ImmPred:$s16), (A2_tfrsi imm:$s16)>;

For dividing regs we use PatFrags LoReg and HiReg.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list