Addition of a feature and a predicate used to control generation of madd.fmt and similar instructions.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Rather than enabling the usage of 4 operand multiply accumulate instructions, we want to presume they're available by default if the ISA supports them. So rather than "HasMadd4", the logic we want is "DisableMadd4" which by default is false.
Changed the feature name to disable_madd4 and set it to false by default.
As a result, removed the -mattr=... options from the test file.
This requires a test. Can you bring back test/CodeGen/Mips/fmad1.ll and add some additional RUN lines where madd/msub/etc is disabled, and check that madd/msub/etc aren't generated?
lib/Target/Mips/Mips.td | ||
---|---|---|
188 ↗ | (On Diff #99906) | This should be "nomadd4" rather than "disable_madd4". |
189 ↗ | (On Diff #99906) | "Disable 4-operand madd.fmt and related instructions". |
LGTM with a nit addressed.
test/CodeGen/Mips/fmadd1.ll | ||
---|---|---|
8–30 ↗ | (On Diff #100702) | Rather than reusing prefixes in a slightly unexpected way, rename the ones that don't have madd.fmt instructions to some like '$ORIGNALLABEL-NOMADD". |
Renamed prefixes.
Additionally, noticed that some of the MC tests were failing due to llvm-mc incorrectly interpreting the newly added feature. Changed AssemblerPredicate<"FeatureMadd4"> to AssemblerPredicate<"!FeatureMadd4"> to fix the issue.