llvm-project/llvm/lib/CodeGen/GlobalISel
Jessica Paquette 47d0780f45 [GlobalISel] Handle more types in narrowScalar for eq/ne G_ICMP
Generalize the existing eq/ne case using `extractParts`. The original code only
handled narrowings for types of width 2n->n. This generalization allows for any
type that can be broken down by `extractParts`.

General overview is:

- Loop over each narrow-sized part and do exactly what the 2-register case did.
- Loop over the leftover-sized parts and do the same thing
- Widen the leftover-sized XOR results to the desired narrow size
- OR that all together and then do the comparison against 0 (just like the old
  code)

This shows up a lot when building clang for AArch64 using GlobalISel, so it's
worth fixing. For the sake of simplicity, this doesn't handle the non-eq/ne
case yet.

Also remove the code in this case that notifies the observer; we're just going
to delete MI anyway so talking to the observer shouldn't be necessary.

Differential Revision: https://reviews.llvm.org/D105161
2021-07-12 22:18:50 -07:00
..
CMakeLists.txt [globalisel][legalizer] Separate the deprecated LegalizerInfo from the current one 2021-06-01 13:23:48 -07:00
CSEInfo.cpp [GISel] Print better error messages for missing Combiner Observer calls 2021-07-01 15:18:18 -07:00
CSEMIRBuilder.cpp GlobalISel: Avoid unnecessary truncation to i64 2021-03-21 10:07:41 -04:00
CallLowering.cpp GlobalISel: Track original argument index in ArgInfo 2021-07-08 13:39:02 -04:00
Combiner.cpp [GISel] Print better error messages for missing Combiner Observer calls 2021-07-01 15:18:18 -07:00
CombinerHelper.cpp [GlobalISel] Clean up CombinerHelper::apply* functions to return void. 2021-07-02 13:17:06 -07:00
GISelChangeObserver.cpp GlobalISel: Use Register 2020-08-19 13:45:31 -04:00
GISelKnownBits.cpp [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
GlobalISel.cpp
IRTranslator.cpp Revert "GlobalISel/AArch64: don't optimize away redundant branches at -O0" 2021-07-09 08:23:36 +05:00
InlineAsmLowering.cpp [GlobalISel][InlineAsm] Fix matching input constraint to physreg 2020-08-06 14:35:51 +02:00
InstructionSelect.cpp [AArch64][GlobalISel] Enable use of the optsize predicate in the selector. 2021-03-02 12:55:51 -08:00
InstructionSelector.cpp [GlobalISel] Add missing operand update when copy is required 2021-01-20 10:32:52 +01:00
LegacyLegalizerInfo.cpp [GlobalISel] NFC: Change LLT::vector to take ElementCount. 2021-06-24 11:26:12 +01:00
LegalityPredicates.cpp GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
LegalizeMutations.cpp [GlobalISel] NFC: Change LLT::vector to take ElementCount. 2021-06-24 11:26:12 +01:00
Legalizer.cpp [GlobalISel] Add a new artifact combiner for unmerge which looks through general artifact expressions. 2021-07-09 22:35:00 -07:00
LegalizerHelper.cpp [GlobalISel] Handle more types in narrowScalar for eq/ne G_ICMP 2021-07-12 22:18:50 -07:00
LegalizerInfo.cpp GlobalISel: Use LLT in memory legality queries 2021-06-30 17:44:13 -04:00
Localizer.cpp [CodeGen] Use range-based for loops (NFC) 2021-02-20 21:46:02 -08:00
LostDebugLocObserver.cpp Give helpers internal linkage. NFC. 2020-04-25 11:50:52 +02:00
MachineIRBuilder.cpp CodeGen: Store LLT instead of uint64_t in MachineMemOperand 2021-06-29 17:38:51 -04:00
RegBankSelect.cpp [GlobalISel] Fix crash in RBS with a non-generic IMPLICIT_DEF. 2021-03-24 23:08:51 -07:00
RegisterBank.cpp [GlobalISel] Use ListSeparator (NFC) 2021-02-04 21:18:04 -08:00
RegisterBankInfo.cpp [CodeGen] Use llvm::append_range (NFC) 2021-01-21 19:59:46 -08:00
Utils.cpp [GlobalISel] NFC: Change LLT::scalarOrVector to take ElementCount. 2021-06-25 11:26:16 +01:00