diff options
author | Sam Elliott <selliott@lowrisc.org> | 2021-01-15 11:20:28 +0000 |
---|---|---|
committer | Sam Elliott <selliott@lowrisc.org> | 2021-01-15 11:28:19 +0000 |
commit | 141e45b99ca09235b985504e8108dbb3cf210fbd (patch) | |
tree | 67e620162b160ca174f7f3e491a9ce2acb4de9aa /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | b9993fcbf53aa28ca2e7696a1855affeb558b51c (diff) | |
download | llvm-141e45b99ca09235b985504e8108dbb3cf210fbd.zip llvm-141e45b99ca09235b985504e8108dbb3cf210fbd.tar.gz llvm-141e45b99ca09235b985504e8108dbb3cf210fbd.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions