mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
R600/SI: Use bcnt instruction for ctpop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -220,12 +220,19 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f64, Expand);
|
||||
}
|
||||
|
||||
for (MVT VT : { MVT::i32, MVT::i64 }) {
|
||||
// TODO: Evergreen has BCNT_INT for CTPOP
|
||||
setOperationAction(ISD::CTPOP, VT, Expand);
|
||||
setOperationAction(ISD::CTTZ, VT, Expand);
|
||||
setOperationAction(ISD::CTLZ, VT, Expand);
|
||||
}
|
||||
|
||||
static const MVT::SimpleValueType IntTypes[] = {
|
||||
MVT::v2i32, MVT::v4i32
|
||||
};
|
||||
|
||||
for (MVT VT : IntTypes) {
|
||||
//Expand the following operations for the current type by default
|
||||
// Expand the following operations for the current type by default.
|
||||
setOperationAction(ISD::ADD, VT, Expand);
|
||||
setOperationAction(ISD::AND, VT, Expand);
|
||||
setOperationAction(ISD::FP_TO_SINT, VT, Expand);
|
||||
@@ -244,6 +251,9 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
|
||||
setOperationAction(ISD::VSELECT, VT, Expand);
|
||||
setOperationAction(ISD::XOR, VT, Expand);
|
||||
setOperationAction(ISD::BSWAP, VT, Expand);
|
||||
setOperationAction(ISD::CTPOP, VT, Expand);
|
||||
setOperationAction(ISD::CTTZ, VT, Expand);
|
||||
setOperationAction(ISD::CTLZ, VT, Expand);
|
||||
}
|
||||
|
||||
static const MVT::SimpleValueType FloatTypes[] = {
|
||||
|
||||
Reference in New Issue
Block a user