aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2025-06-24 15:45:06 -0700
committerGitHub <noreply@github.com>2025-06-24 15:45:06 -0700
commit48a21e69159a7e6698cde380f6d64274c6569f29 (patch)
tree72cac7a94b9879b8c6344cd9b62f3e3bf6a4a16f /clang/lib/Frontend/CompilerInvocation.cpp
parent9702d37062a3bee4e658434da10e703fc2250ee0 (diff)
downloadllvm-48a21e69159a7e6698cde380f6d64274c6569f29.zip
llvm-48a21e69159a7e6698cde380f6d64274c6569f29.tar.gz
llvm-48a21e69159a7e6698cde380f6d64274c6569f29.tar.bz2
[RISCV] Fix a correctness issue in optimizeCondBranch. Prevent optimizing compare with x0. NFC (#145440)
We were incorrectly changing -1 to 0 for unsigned compares in case 1. The comment incorrectly said UINT64_MAX is bigger than INT64_MAX, but we were doing a signed compare and UINT64_MAX is smaller than INT64_MAX in signed space. Prevent changing 0 constants since we can use x0. The test cases for these are contrived to use addi rd, x0, 0. We're more likely to have a COPY from x0 which we already don't optimize for other reasons. Check if registers are virtual before calling hasOneUse. The use count for physical registers is meaningless.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions