diff options
| author | Venkatraman Govindaraju <venkatra@cs.wisc.edu> | 2014-01-01 19:00:10 +0000 |
|---|---|---|
| committer | Venkatraman Govindaraju <venkatra@cs.wisc.edu> | 2014-01-01 19:00:10 +0000 |
| commit | acf0233a467510afd225d2b7117e43b0300be7ef (patch) | |
| tree | 1615507f469a592a1fa05961b1211cdcb6414164 /llvm/lib/Target/Sparc | |
| parent | 545b6803c3beb49a2cb7cfc8c0f516ad5be7c5d7 (diff) | |
| download | bcm5719-llvm-acf0233a467510afd225d2b7117e43b0300be7ef.tar.gz bcm5719-llvm-acf0233a467510afd225d2b7117e43b0300be7ef.zip | |
[SparcV9]: Use SRL instead of SLL to clear top 32-bits in ctpop:i32. SLL does not clear top 32 bit, only SRL does.
llvm-svn: 198280
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.td | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td index 12a0962cac1..3b2b17191fe 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.td +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td @@ -967,13 +967,13 @@ let Predicates = [HasV9] in { } // POPCrr - This does a ctpop of a 64-bit register. As such, we have to clear -// the top 32-bits before using it. To do this clearing, we use a SLLri X,0. +// the top 32-bits before using it. To do this clearing, we use a SRLri X,0. let rs1 = 0 in def POPCrr : F3_1<2, 0b101110, (outs IntRegs:$dst), (ins IntRegs:$src), "popc $src, $dst", []>, Requires<[HasV9]>; def : Pat<(ctpop i32:$src), - (POPCrr (SLLri $src, 0))>; + (POPCrr (SRLri $src, 0))>; //===----------------------------------------------------------------------===// // Non-Instruction Patterns |

