[RISCV] Optimize Branch Comparisons
I noticed in D94450 that there were quite a few places where we generate the sequence: ``` xN <- comparison ... xN <- xor xN, 1 bnez xN, symbol ``` Given we know the XOR will be used by BRCOND, which only looks at the lowest bit, I think we can remove the XOR and just invert the branch condition in these cases? The case mostly seems to come up in floating point tests, where there is often more logic to combine the results of multiple SETCCs, rather than a single (BRCOND (SETCC ...) ...). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94535
Loading
Please register or sign in to comment