mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[TargetLowering] Move shouldFoldShiftPairToMask next to preferShiftsToClearExtremeBits. NFCI.
As discussed on PR41359, we're probably going to keep both of these but we need to make it more explicit how they complement each other. llvm-svn: 358071
This commit is contained in:
parent
78c41d5b7d
commit
c86bf7ac80
@ -534,6 +534,15 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Return true if it is profitable to fold a pair of shifts into a mask.
|
||||
/// This is usually true on most targets. But some targets, like Thumb1,
|
||||
/// have immediate shift instructions, but no immediate "and" instruction;
|
||||
/// this makes the fold unprofitable.
|
||||
virtual bool shouldFoldShiftPairToMask(const SDNode *N,
|
||||
CombineLevel Level) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Should we tranform the IR-optimal check for whether given truncation
|
||||
/// down into KeptBits would be truncating or not:
|
||||
/// (add %x, (1 << (KeptBits-1))) srccond (1 << KeptBits)
|
||||
@ -3138,15 +3147,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Return true if it is profitable to fold a pair of shifts into a mask.
|
||||
/// This is usually true on most targets. But some targets, like Thumb1,
|
||||
/// have immediate shift instructions, but no immediate "and" instruction;
|
||||
/// this makes the fold unprofitable.
|
||||
virtual bool shouldFoldShiftPairToMask(const SDNode *N,
|
||||
CombineLevel Level) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return true if it is profitable to combine a BUILD_VECTOR with a stride-pattern
|
||||
// to a shuffle and a truncate.
|
||||
// Example of such a combine:
|
||||
|
Loading…
Reference in New Issue
Block a user