This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] XTHeadMemPair: Fix invalid mempair combine for types other than i32/i64
ClosedPublic

Authored by mtsamis on Feb 22 2023, 6:12 AM.

Details

Summary

A mistake in the control flow of performMemPairCombine resulted in paired
loads/stores for types that were not supported by the instructions (i8/i16).
These loads/stores could not match the constraints of the patterns defined
in the THead td file and the compiler would throw a 'Cannot select' error.

This is now fixed and two new test functions have been added in xtheadmempair.ll
which would previously crash the compiler. The compiler was additionally tested
with a wide range of benchmarks and no issues were observed.

Diff Detail

Event Timeline

mtsamis created this revision.Feb 22 2023, 6:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 6:12 AM
mtsamis requested review of this revision.Feb 22 2023, 6:12 AM
craig.topper accepted this revision.Feb 22 2023, 8:43 AM

LGTM

llvm/lib/Target/RISCV/RISCVISelLowering.cpp
9786

Capitalize variable names

This revision is now accepted and ready to land.Feb 22 2023, 8:43 AM
mtsamis updated this revision to Diff 499551.Feb 22 2023, 9:17 AM

Capitalize variable name

This revision was landed with ongoing or failed builds.Feb 22 2023, 10:57 AM
This revision was automatically updated to reflect the committed changes.