Skip to content

Commit

Permalink
[RISCV][GISel] Legalize G_SADDO/G_SSUBO/G_UADDO/G_USUBO. (#67615)
Browse files Browse the repository at this point in the history
  • Loading branch information
topperc authored Sep 30, 2023
1 parent 4bae636 commit e39727d
Show file tree
Hide file tree
Showing 3 changed files with 1,114 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
const LLT XLenLLT = LLT::scalar(XLen);
const LLT DoubleXLenLLT = LLT::scalar(2 * XLen);
const LLT p0 = LLT::pointer(0, XLen);
const LLT s1 = LLT::scalar(1);
const LLT s8 = LLT::scalar(8);
const LLT s16 = LLT::scalar(16);
const LLT s32 = LLT::scalar(32);
Expand All @@ -43,8 +42,9 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
.clampScalar(0, s32, XLenLLT);

getActionDefinitionsBuilder(
{G_UADDE, G_UADDO, G_USUBE, G_USUBO})
.lowerFor({{XLenLLT, s1}});
{G_UADDE, G_UADDO, G_USUBE, G_USUBO}).lower();

getActionDefinitionsBuilder({G_SADDO, G_SSUBO}).minScalar(0, XLenLLT).lower();

getActionDefinitionsBuilder({G_ASHR, G_LSHR, G_SHL})
.legalFor({{s32, s32}, {XLenLLT, XLenLLT}})
Expand Down
Loading

0 comments on commit e39727d

Please sign in to comment.