[llvm-dev] Help handling opaque AArch64 immediates

Steve King via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 14 17:39:23 PST 2016


Hello LLVM,
I'm playing with a new ISD::OPAQUE instruction to make hoisting first
class and eliminate a lot of tweaky flag setting/checking around
opaque constants.  It's going well for the IR and x86, but I now I
need to sort out details for all the other targets.

To start, can someone please advise on the AAarch64 equivalent of
these X86 patterns?

// Opaque values become mov immediate to register
def : Pat<(i64 (opaque imm:$src)), (MOV64ri imm:$src)>;
def : Pat<(i32 (opaque imm:$src)), (MOV32ri imm:$src)>;
def : Pat<(i16 (opaque imm:$src)), (MOV16ri imm:$src)>;

The 'opaque' here is of course hiding the immediate from folding.
What I'm looking for is the AAarch64 equivalent to copying the opaque
immediate into a register.

I promise your help won't be construed as an endorsement of the
ISD::OPAQUE idea :)

Thanks,
-steve


More information about the llvm-dev mailing list