[llvm-dev] Conditional tablegen expressions with math ops?
Matt Arsenault via llvm-dev
llvm-dev at lists.llvm.org
Thu May 5 13:36:19 PDT 2016
On 05/03/2016 05:20 PM, Phil Tomson via llvm-dev wrote:
> This example is easily "fixed" (the performance is optimized) by
> swapping the 2nd and 3rd operands:
>
> add r1, r1, r2 # r1 <- r1 + r2
>
>
> There are four banks and the formula to figure out which bank a
> register is in is just: r%4
How are your instruction operands defined? Do you have a separate
register class for each bank, and then a superset class for the operands
in the instruction? With a post-isel hook or pass you could try
constraining the register class of the virtual register operands, which
may or may not result in a copy in the end.
-Matt
More information about the llvm-dev
mailing list