summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcherGen.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 00:01:11 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 00:01:11 +0000
commit83facb08120b04b9c5f8b323675d01cacfa1f3af (patch)
tree0a5e77ebdd8e45630e7ebe022ec764295c08f2e0 /llvm/utils/TableGen/DAGISelMatcherGen.cpp
parenta4d86b63c7fd6785f7bfd62176c7eb65daa7a98c (diff)
downloadbcm5719-llvm-83facb08120b04b9c5f8b323675d01cacfa1f3af.tar.gz
bcm5719-llvm-83facb08120b04b9c5f8b323675d01cacfa1f3af.zip
Now that tblgen can handle matching implicit defs of instructions
to input patterns, we can fix X86ISD::CMP and X86ISD::BT as taking two inputs (which have to be the same type) and *returning an i32*. This is how the SDNodes get made in the graph, but we weren't able to model it this way due to deficiencies in the pattern language. Now we can change things like this: def UCOM_FpIr80: FpI_<(outs), (ins RFP80:$lhs, RFP80:$rhs), CompareFP, - [(X86cmp RFP80:$lhs, RFP80:$rhs), - (implicit EFLAGS)]>; // CC = ST(0) cmp ST(i) + [(set EFLAGS, (X86cmp RFP80:$lhs, RFP80:$rhs))]>; and fix terrible crimes like this: -def : Pat<(parallel (X86cmp GR8:$src1, 0), (implicit EFLAGS)), +def : Pat<(X86cmp GR8:$src1, 0), (TEST8rr GR8:$src1, GR8:$src1)>; This relies on matching the result of TEST8rr (which is EFLAGS, which is an implicit def) to the result of X86cmp, an i32. llvm-svn: 98903
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcherGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud