aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'backend/include/rcc/CodeGen')
-rw-r--r--backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h2
-rw-r--r--backend/include/rcc/CodeGen/GlobalISel/LegalizerInfo.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h b/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h
index 07ee8bb..0fdc89f 100644
--- a/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h
+++ b/backend/include/rcc/CodeGen/GlobalISel/LegalizerHelper.h
@@ -29,6 +29,8 @@ public:
[[nodiscard]] Expected<void> lower(MachineInstr &Instruction,
const LegalizationDecision &Decision);
[[nodiscard]] Expected<void> lowerAbsToAddXor(MachineInstr &Instruction);
+ [[nodiscard]] Expected<void> lowerAbsDiffToSelect(MachineInstr &Instruction);
+ [[nodiscard]] Expected<void> lowerAbsDiffToMinMax(MachineInstr &Instruction);
[[nodiscard]] Expected<void> lowerVAArg(MachineInstr &Instruction);
[[nodiscard]] Expected<void> widenScalar(MachineInstr &Instruction, std::size_t TypeIndex,
LowLevelType WideType);
diff --git a/backend/include/rcc/CodeGen/GlobalISel/LegalizerInfo.h b/backend/include/rcc/CodeGen/GlobalISel/LegalizerInfo.h
index 2981f8e..5deefd4 100644
--- a/backend/include/rcc/CodeGen/GlobalISel/LegalizerInfo.h
+++ b/backend/include/rcc/CodeGen/GlobalISel/LegalizerInfo.h
@@ -184,6 +184,10 @@ public:
[[nodiscard]] virtual GenericOpcode getExtOpcodeForWideningConstant(LowLevelType SmallType) const;
+ [[nodiscard]] virtual bool isSExtCheaperThanZExt(LowLevelType, LowLevelType) const {
+ return false;
+ }
+
// This hook performs read-only target checks before a lowering mutation is committed.
[[nodiscard]] virtual Expected<void> validateLowering(const MachineInstr &,
const MachineFunction &,