diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-07-27 15:00:13 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-07-27 15:00:13 +0000 |
| commit | 6ff58ed5ca6f9e964592c11af5aae9e4f9b39ab5 (patch) | |
| tree | 86f951b9155eb063eed717b260b6eb7d12c495c4 /llvm/lib/Target | |
| parent | a703b8dc71fc574dfd921a0215289bdd7f18fc92 (diff) | |
| download | bcm5719-llvm-6ff58ed5ca6f9e964592c11af5aae9e4f9b39ab5.tar.gz bcm5719-llvm-6ff58ed5ca6f9e964592c11af5aae9e4f9b39ab5.zip | |
AMDGPU/R600: Add MOV instructions to BFE patterns
R600 can't handle immediates for BFE, these will be eliminated later.
Fixes powr/pow regressions n r600 since r334817
Differential Revision: https://reviews.llvm.org/D49641
llvm-svn: 338127
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUInstructions.td | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td index c73f334da86..9426df39959 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td @@ -753,30 +753,30 @@ multiclass BFEPattern <Instruction UBFE, Instruction SBFE, Instruction MOV> { // x & ((1 << y) - 1) def : AMDGPUPat < (and i32:$src, (add_oneuse (shl_oneuse 1, i32:$width), -1)), - (UBFE $src, (i32 0), $width) + (UBFE $src, (MOV (i32 0)), $width) >; // x & ~(-1 << y) def : AMDGPUPat < (and i32:$src, (xor_oneuse (shl_oneuse -1, i32:$width), -1)), - (UBFE $src, (i32 0), $width) + (UBFE $src, (MOV (i32 0)), $width) >; // x & (-1 >> (bitwidth - y)) def : AMDGPUPat < (and i32:$src, (srl_oneuse -1, (sub 32, i32:$width))), - (UBFE $src, (i32 0), $width) + (UBFE $src, (MOV (i32 0)), $width) >; // x << (bitwidth - y) >> (bitwidth - y) def : AMDGPUPat < (srl (shl_oneuse i32:$src, (sub 32, i32:$width)), (sub 32, i32:$width)), - (UBFE $src, (i32 0), $width) + (UBFE $src, (MOV (i32 0)), $width) >; def : AMDGPUPat < (sra (shl_oneuse i32:$src, (sub 32, i32:$width)), (sub 32, i32:$width)), - (SBFE $src, (i32 0), $width) + (SBFE $src, (MOV (i32 0)), $width) >; } |

