llvm-6502/utils/TableGen
Chris Lattner 39e73f7c83 Special case tblgen generated code for patterns like (and X, 255) or (or X, 42).
The dag/inst combiners often 'simplify' the masked value based on whether
or not the bits are live or known zero/one.  This is good and dandy, but
often causes special case patterns to fail, such as alpha's CMPBGE pattern,
which looks like "(set GPRC:$RC, (setuge (and GPRC:$RA, 255), (and GPRC:$RB, 255)))".
Here the pattern for (and X, 255) should match actual dags like (and X, 254) if
the dag combiner proved that the missing bits are already zero (one for 'or').

For CodeGen/Alpha/cmpbge.ll:test2 for example, this results in:

        sll $16,1,$0
        cmpbge $0,$17,$0
        ret $31,($26),1

instead of:

        sll $16,1,$0
        and $0,254,$0
        and $17,255,$1
        cmpule $1,$0,$0
        ret $31,($26),1

... and requires no target-specific code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30871 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:05:55 +00:00
..
.cvsignore Add new generated files to be ignored. 2006-03-23 23:45:32 +00:00
AsmWriterEmitter.cpp This: 2006-09-27 16:44:09 +00:00
AsmWriterEmitter.h Maximally group commands. When all instructions within a command set have a 2006-07-18 18:28:27 +00:00
CodeEmitterGen.cpp Fix JIT encoding of two-addr instructions. 2006-09-05 03:01:52 +00:00
CodeEmitterGen.h 1. Simplfy bit operations. 2006-07-13 21:02:53 +00:00
CodeGenInstruction.h * Remove instruction fields hasInFlag / hasOutFlag and added SNDPInFlag and 2006-01-09 18:27:06 +00:00
CodeGenIntrinsics.h Only compute intrinsic valuetypes when in a target .td file. 2006-03-28 00:15:00 +00:00
CodeGenRegisters.h Add support for generating v4i32 altivec code 2005-12-30 00:12:56 +00:00
CodeGenTarget.cpp Allow more use of iPTR in patterns. 2006-06-15 00:16:37 +00:00
CodeGenTarget.h Don't generate getCalleeSaveReg and getCalleeSaveRegClasses anymore. 2006-05-18 00:08:46 +00:00
DAGISelEmitter.cpp Special case tblgen generated code for patterns like (and X, 255) or (or X, 42). 2006-10-11 04:05:55 +00:00
DAGISelEmitter.h A bit more clean up. 2006-08-26 01:02:19 +00:00
FileLexer.cpp.cvs Fix Regression/TableGen/2006-09-18-LargeInt.td 2006-09-18 22:28:27 +00:00
FileLexer.l Fix Regression/TableGen/2006-09-18-LargeInt.td 2006-09-18 22:28:27 +00:00
FileLexer.l.cvs Fix Regression/TableGen/2006-09-18-LargeInt.td 2006-09-18 22:28:27 +00:00
FileParser.cpp.cvs regenerate 2006-10-07 07:15:19 +00:00
FileParser.h.cvs regenerate 2006-09-01 21:14:42 +00:00
FileParser.y Bugfix: this allows multiclasses to have default arguments. 2006-10-07 07:14:48 +00:00
FileParser.y.cvs regenerate 2006-10-07 07:15:19 +00:00
InstrInfoEmitter.cpp Eliminate data relocations by using NULL instead of global empty list. 2006-07-21 21:15:20 +00:00
InstrInfoEmitter.h Emit itinerary class in instruction info. 2005-10-31 17:16:46 +00:00
IntrinsicEmitter.cpp Fix more static dtor issues 2006-10-04 21:52:35 +00:00
IntrinsicEmitter.h extract some more information from the intrinsic table 2006-03-24 01:13:55 +00:00
Makefile tblgen uses EH 2006-07-07 00:21:17 +00:00
Record.cpp Generalize the previous binary operator support and add a string concatenation 2006-03-31 21:53:49 +00:00
Record.h Add virtual methods to all subclasses so they are not overloaded. 2006-08-28 00:12:25 +00:00
RegisterInfoEmitter.cpp Use an enumeration to eliminate data relocations. 2006-07-21 20:57:35 +00:00
RegisterInfoEmitter.h Remove trailing whitespace 2005-04-22 00:00:37 +00:00
SubtargetEmitter.cpp Don't make zero-sized static arrays 2006-05-24 17:31:02 +00:00
SubtargetEmitter.h Allow itineraries to be passed through the Target Machine. 2005-11-01 20:06:59 +00:00
TableGen.cpp remove a bunch of long-dead testing code 2006-03-03 02:34:28 +00:00
TableGenBackend.cpp Remove trailing whitespace 2005-04-22 00:00:37 +00:00
TableGenBackend.h Remove trailing whitespace 2005-04-22 00:00:37 +00:00