Make sure to use the result of the pattern to infer the result type of the
authorChris Lattner <sabre@nondot.org>
Tue, 20 Jun 2006 00:18:02 +0000 (00:18 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Jun 2006 00:18:02 +0000 (00:18 +0000)
commita354849c27ef5a4bc55d03a15ce6f89f22a1ca5c
treed1800412ff8dbc1088c78d9f12b4ea67a05deb2e
parenta973993c0cf4b1baf4289fd1206bd54c79ad68cb
Make sure to use the result of the pattern to infer the result type of the
instruction, and the result type of the instruction to refine the pattern.
This allows us to write things like this:

def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (v2i64 VR128:$src)>;

as:
def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (VR128:$src)>

and fixes a ppc64 issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28863 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/DAGISelEmitter.cpp