[LLVMdev] Mips -> DLX Modifications as Target

Anton Korobeynikov anton at korobeynikov.info
Mon Jul 6 06:33:28 PDT 2009


Hello, Sean

> Mainly the problem is if the constant is specified as negative,  and
> when 0-constant can fit in 16-bits unsigned, wish it to use the SUBui
> instruction.
sub reg, imm is canonicalized in LLVM into add imm, -imm. You need to
"replay" this back via some "pipehole" pattern.

You might find ARM target useful as an example.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list