Narrow Scalar G_MUL for MIPS32.
Revisit NarrowScalar implementation in LegalizerHelper.
Introduce new helper function MultiplyRegisters.
It performs generic multiplication of values held in multiple registers.
Generated instructions use only types NarrowTy and i1.
Destination can be same or two times size of the source.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/CodeGen/GlobalISel/LegalizerHelper.h | ||
---|---|---|
169 ↗ | (On Diff #188897) | Should start with lower case |
174 ↗ | (On Diff #188897) | ditto |
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
2547–2554 ↗ | (On Diff #188897) | This function doesn't particularly make sense to me as a general legalizer helper function, especially with the arbitrary choice of extending. I think a buildUaddo should be added to MachineIRBuilder, and then the places using it just need something like |
2598 ↗ | (On Diff #188897) | You can avoid these explicit create calls by passing the type to the build*functions |
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
2573–2575 ↗ | (On Diff #189465) | Variable to avoid weird wrapping |
2585–2600 ↗ | (On Diff #189465) | The formatting of this is weird. This looks like the horrors clang-format produces, so some intermediate variables might help |
2592 ↗ | (On Diff #189465) | You can still avoid this by saving the result of buildUAddo |