From b85a348ab7bdd878fd975121fc2501625eceec95 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Fri, 14 Aug 2026 22:37:46 +0800 Subject: [GlobalISel] Legalize G_ABS --- backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp') diff --git a/backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp index 7d9e6ff..c4cf946 100644 --- a/backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp +++ b/backend/lib/CodeGen/GlobalISel/LegalizerInfo.cpp @@ -474,4 +474,8 @@ Expected LegalizerInfo::isUnsupported(const LegalizationQuery &Query) cons return Decision->Action == LegalizationAction::Unsupported; } +GenericOpcode LegalizerInfo::getExtOpcodeForWideningConstant(LowLevelType SmallType) const { + return SmallType.minimumBitWidth() % 8U == 0 ? GenericOpcode::G_SEXT : GenericOpcode::G_ZEXT; +} + } // namespace rcc -- cgit v1.2.3