llvm-6502/lib/Target/Mips
Ahmed Bougacha 7fac1d945f [SelectionDAG] Allow targets to specify legality of extloads' result
type (in addition to the memory type).

The *LoadExt* legalization handling used to only have one type, the
memory type.  This forced users to assume that as long as the extload
for the memory type was declared legal, and the result type was legal,
the whole extload was legal.

However, this isn't always the case.  For instance, on X86, with AVX,
this is legal:
    v4i32 load, zext from v4i8
but this isn't:
    v4i64 load, zext from v4i8
Whereas v4i64 is (arguably) legal, even without AVX2.

Note that the same thing was done a while ago for truncstores (r46140),
but I assume no one needed it yet for extloads, so here we go.

Calls to getLoadExtAction were changed to add the value type, found
manually in the surrounding code.

Calls to setLoadExtAction were mechanically changed, by wrapping the
call in a loop, to match previous behavior.  The loop iterates over
the MVT subrange corresponding to the memory type (FP vectors, etc...).
I also pulled neighboring setTruncStoreActions into some of the loops;
those shouldn't make a difference, as the additional types are illegal.
(e.g., i128->i1 truncstores on PPC.)

No functional change intended.

Differential Revision: http://reviews.llvm.org/D6532


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225421 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-08 00:51:32 +00:00
..
AsmParser Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert. 2015-01-05 10:15:49 +00:00
Disassembler [mips][microMIPS] Implement CACHE, PREF, SSNOP, EHB and PAUSE instructions 2014-12-23 19:55:34 +00:00
InstPrinter Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert. 2015-01-05 10:15:49 +00:00
MCTargetDesc [mips][microMIPS] Relocate with symbol for micromips symbols 2014-12-30 22:04:16 +00:00
TargetInfo Prune redundant dependencies in LLVMBuild.txt. 2013-12-11 00:30:57 +00:00
CMakeLists.txt MipsABIInfo class is used in different libraries. Moving the files to MCTargetDesc folder(LLVMMipsDesc library) prevents linkage errors. There are no functional changes. 2014-12-17 11:49:56 +00:00
LLVMBuild.txt Prune redundant libdeps. 2014-07-24 11:45:27 +00:00
Makefile Reinstate "Nuke the old JIT." 2014-09-02 22:28:02 +00:00
MicroMipsInstrFormats.td [mips][microMIPS] Implement CACHE, PREF, SSNOP, EHB and PAUSE instructions 2014-12-23 19:55:34 +00:00
MicroMipsInstrFPU.td [mips][microMIPS] Fix opcodes of MFHC1 and MTHC1 instructions. 2014-11-19 13:37:51 +00:00
MicroMipsInstrInfo.td [mips][microMIPS] Implement CACHE, PREF, SSNOP, EHB and PAUSE instructions 2014-12-23 19:55:34 +00:00
Mips16FrameLowering.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
Mips16FrameLowering.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Mips16HardFloat.cpp Rewrite the Mips16HardFloat pass to avoid using the Subtarget. 2015-01-06 01:12:30 +00:00
Mips16HardFloat.h Rewrite the Mips16HardFloat pass to avoid using the Subtarget. 2015-01-06 01:12:30 +00:00
Mips16HardFloatInfo.cpp [C++] Use 'nullptr'. Target edition. 2014-04-25 05:30:21 +00:00
Mips16HardFloatInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Mips16InstrFormats.td Fix a whole bunch of binary literals which were the wrong size. All were being silently zero extended to the correct width. 2014-08-07 05:46:54 +00:00
Mips16InstrInfo.cpp Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert. 2015-01-05 10:15:49 +00:00
Mips16InstrInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Mips16InstrInfo.td Replace neverHasSideEffects=1 with hasSideEffects=0 in all .td files. 2014-11-26 00:46:26 +00:00
Mips16ISelDAGToDAG.cpp Remove a bunch of unnecessary typecasts to 'const TargetRegisterClass *' 2014-11-21 05:58:21 +00:00
Mips16ISelDAGToDAG.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Mips16ISelLowering.cpp Re-commit r221056 and others with fix, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC." 2014-11-02 16:09:29 +00:00
Mips16ISelLowering.h Re-commit r221056 and others with fix, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC." 2014-11-02 16:09:29 +00:00
Mips16RegisterInfo.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
Mips16RegisterInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Mips32r6InstrFormats.td Fix bit initializer which was one bit too long, but worked so long as we silently dropped the leading 0 2014-07-31 01:43:54 +00:00
Mips32r6InstrInfo.td [mips] Fix two patterns that select i32's (for MIPS32r6) / i64's (for MIPS64r6) 2014-07-22 13:36:02 +00:00
Mips64InstrInfo.td [mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs... 2014-11-07 16:54:21 +00:00
Mips64r6InstrInfo.td [mips] Fix two patterns that select i32's (for MIPS32r6) / i64's (for MIPS64r6) 2014-07-22 13:36:02 +00:00
Mips.h Reinstate "Nuke the old JIT." 2014-09-02 22:28:02 +00:00
Mips.td [mips] Replace MipsABIEnum with a MipsABIInfo class. 2014-10-24 16:15:27 +00:00
MipsAnalyzeImmediate.cpp Remove unnecessary copying or replace it with moves in a bunch of places. 2014-10-04 16:55:56 +00:00
MipsAnalyzeImmediate.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsAsmPrinter.cpp Use the same call off of the TargetMachine rather than the subtarget. 2015-01-06 01:12:40 +00:00
MipsAsmPrinter.h [mips] Set GCC-compatible MIPS asssembler options before inline asm blocks. 2014-12-17 10:56:16 +00:00
MipsCallingConv.td [mips] Add Mips-specific CCIf's for accessing the MipsCCState. NFC. 2014-12-08 15:40:09 +00:00
MipsCCState.cpp [mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534. 2014-11-10 15:57:53 +00:00
MipsCCState.h [mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs... 2014-11-07 16:54:21 +00:00
MipsCondMov.td [mips] Enable code generation for MIPS-III. 2014-12-12 15:16:46 +00:00
MipsConstantIslandPass.cpp [mips] Replace MipsABIEnum with a MipsABIInfo class. 2014-10-24 16:15:27 +00:00
MipsDelaySlotFiller.cpp [mips][micromips] Use call instructions with short delay slots 2014-11-25 10:50:00 +00:00
MipsDSPInstrFormats.td Make it possible for the Subtarget to change between function 2014-07-10 17:26:51 +00:00
MipsDSPInstrInfo.td
MipsFastISel.cpp Rewrite the Mips16HardFloat pass to avoid using the Subtarget. 2015-01-06 01:12:30 +00:00
MipsFrameLowering.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
MipsFrameLowering.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsInstrFormats.td [mips] Add synci instruction. 2014-11-27 17:28:10 +00:00
MipsInstrFPU.td [mips] Move COP2 & COP3 load/store instructions from MipsInstrFPU.td to MipsInstrInfo.td. NFC. 2014-11-04 21:45:16 +00:00
MipsInstrInfo.cpp Make InstrInfo depend only upon the Subtarget getting passed in 2014-07-18 23:25:00 +00:00
MipsInstrInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsInstrInfo.td [mips][microMIPS] Implement CACHE, PREF, SSNOP, EHB and PAUSE instructions 2014-12-23 19:55:34 +00:00
MipsISelDAGToDAG.cpp Make it possible for the Subtarget to change between function 2014-07-10 17:26:51 +00:00
MipsISelDAGToDAG.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsISelLowering.cpp [SelectionDAG] Allow targets to specify legality of extloads' result 2015-01-08 00:51:32 +00:00
MipsISelLowering.h [mips] Support SELECT nodes for targets that don't have conditional-move instructions. 2014-12-12 14:41:37 +00:00
MipsLongBranch.cpp Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert. 2015-01-05 10:15:49 +00:00
MipsMachineFunction.cpp Remove a bunch of unnecessary typecasts to 'const TargetRegisterClass *' 2014-11-21 05:58:21 +00:00
MipsMachineFunction.h Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already. 2014-08-30 16:48:02 +00:00
MipsMCInstLower.cpp [mips] Optimize long branch for MIPS64 by removing %higher and %highest. 2014-05-27 18:53:06 +00:00
MipsMCInstLower.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsModuleISelDAGToDAG.cpp Fundamentally change the MipsSubtarget replacement machinery: 2014-07-18 23:41:32 +00:00
MipsModuleISelDAGToDAG.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsMSAInstrFormats.td Make it possible for the Subtarget to change between function 2014-07-10 17:26:51 +00:00
MipsMSAInstrInfo.td [mips] Rename MipsAsmParser functions to conform to the LLVM Coding Standards. No functional changes. 2014-09-04 13:23:44 +00:00
MipsOptimizePICCall.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
MipsOptionRecord.h Make some helpers static or move into the llvm namespace. 2014-09-03 21:04:12 +00:00
MipsOs16.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:41:26 +00:00
MipsOs16.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsRegisterInfo.cpp [mips] Initial implementation of -mabicalls/-mno-abicalls. 2014-08-08 10:01:29 +00:00
MipsRegisterInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsRegisterInfo.td [mips][microMIPS] Implement disassembler support for 16-bit instructions LBU16, LHU16, LW16, SB16, SH16 and SW16 2014-11-26 18:56:38 +00:00
MipsSchedule.td [mips] Implement shorthand add / sub forms for MIPS. 2014-03-24 14:05:39 +00:00
MipsSEFrameLowering.cpp [mips] Account for endianess when expanding BuildPairF64/ExtractElementF64 nodes. 2014-10-16 15:41:51 +00:00
MipsSEFrameLowering.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsSEInstrInfo.cpp Remove dead variable. 2015-01-06 01:12:42 +00:00
MipsSEInstrInfo.h Remove dead variable. 2015-01-06 01:12:42 +00:00
MipsSEISelDAGToDAG.cpp Remove a bunch of unnecessary typecasts to 'const TargetRegisterClass *' 2014-11-21 05:58:21 +00:00
MipsSEISelDAGToDAG.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsSEISelLowering.cpp [SelectionDAG] Allow targets to specify legality of extloads' result 2015-01-08 00:51:32 +00:00
MipsSEISelLowering.h Re-commit r221056 and others with fix, "[mips] Move F128 argument handling into MipsCCState as we did for returns. NFC." 2014-11-02 16:09:29 +00:00
MipsSelectionDAGInfo.cpp Have MipsSelectionDAGInfo constructor take a DataLayout rather 2014-06-27 04:38:30 +00:00
MipsSelectionDAGInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsSERegisterInfo.cpp Have MachineFunction cache a pointer to the subtarget to make lookups 2014-08-05 02:39:49 +00:00
MipsSERegisterInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MipsSubtarget.cpp Remove unused variable, initializer, and accessor. 2014-12-19 23:46:53 +00:00
MipsSubtarget.h Remove unused variable, initializer, and accessor. 2014-12-19 23:46:53 +00:00
MipsTargetMachine.cpp Enable MachineVerifier in debug mode for X86, ARM, AArch64, Mips. 2014-12-11 23:18:03 +00:00
MipsTargetMachine.h Rewrite the Mips16HardFloat pass to avoid using the Subtarget. 2015-01-06 01:12:30 +00:00
MipsTargetObjectFile.cpp [mips] Add the following MIPS options that control gp-relative addressing of 2014-11-06 13:20:12 +00:00
MipsTargetObjectFile.h [mips] Add the following MIPS options that control gp-relative addressing of 2014-11-06 13:20:12 +00:00
MipsTargetStreamer.h [mips] Rename emit and parse functions for the .cpload assembler directive. NFC. 2014-10-01 14:53:19 +00:00
MSA.txt Revert r221048 - Test commit 2014-11-01 16:08:03 +00:00