Evaluate instruction predicates during legalization.
Evaluate instruction predicates during legalization.

The generated legalization code needs to evaluate any instruction
patterns on the input pattern being matched.

Emit predicate checking code inside the InstructionFormat pattern match
where all the instruction's immediate fields are available to the
predicate code.

Also make sure an `args` array is available for any type predicates to
evaluate correctly.

sunfishcode/cretonne,stoklund/cretonne,stoklund/cretonne,sunfishcode/cretonne,stoklund/cretonne,sunfishcode/cretonne