mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-23 19:17:17 +00:00
R600/SI: Add pattern to simplify i64 loading
This is a candidate for the stable branch. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175356 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9ba1830df
commit
ecc571f063
@ -40,6 +40,10 @@ def IMM12bit : ImmLeaf <
|
||||
[{return isUInt<12>(Imm);}]
|
||||
>;
|
||||
|
||||
class InlineImm <ValueType vt> : ImmLeaf <vt, [{
|
||||
return -16 <= Imm && Imm <= 64;
|
||||
}]>;
|
||||
|
||||
class InstSI <dag outs, dag ins, string asm, list<dag> pattern> :
|
||||
AMDGPUInst<outs, ins, asm, pattern> {
|
||||
|
||||
|
@ -1292,6 +1292,11 @@ def : Pat <
|
||||
(S_MOV_B32 fpimm:$imm)
|
||||
>;
|
||||
|
||||
def : Pat <
|
||||
(i64 InlineImm<i64>:$imm),
|
||||
(S_MOV_B64 InlineImm<i64>:$imm)
|
||||
>;
|
||||
|
||||
// i64 immediates aren't supported in hardware, split it into two 32bit values
|
||||
def : Pat <
|
||||
(i64 imm:$imm),
|
||||
|
Loading…
x
Reference in New Issue
Block a user