Add patterns with seteq/setne conditions. We don't have instructions for seteq/setne except for comparing with zero and need to emit an ADDI or XOR before a seqz/snez to compare other values. The select ISD node takes a 0/1 value for the condition, but the VT_MASKC(N) instructions check all XLen bits for zero or non-zero. We can use this to avoid the seqz/snez in many cases. This is pretty ridiculous number of patterns. I wonder if we could use some ComplexPatterns to merge them, but I'd like to do that as a follow up and focus on correctness of the result in this patch. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D140421
18 KiB
18 KiB