aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorAlex Bradbury <asb@igalia.com>2022-08-17 13:48:05 +0100
committerAlex Bradbury <asb@igalia.com>2022-08-17 13:49:15 +0100
commitce381281940fb6a9cc2fa1a16fa36bf0911f43f1 (patch)
tree629cd00a8a18a5a1dc47b93054d3364bfc3388ad /clang/lib/Frontend/TestModuleFileExtension.cpp
parentcc8c746f8df5274ac20486bd62b1183c0583ea6a (diff)
downloadllvm-ce381281940fb6a9cc2fa1a16fa36bf0911f43f1.zip
llvm-ce381281940fb6a9cc2fa1a16fa36bf0911f43f1.tar.gz
llvm-ce381281940fb6a9cc2fa1a16fa36bf0911f43f1.tar.bz2
[RISCV] Avoid redundant branch-to-branch when expanding cmpxchg
If the success value of a cmpxchg is used in a branch, the expanded cmpxchg sequence ends up with a redundant branch-to-branch (as the backend atomics expansion happens as late as possible, passes to optimise such cases have already run). This patch identifies this case and avoid it when expanding the cmpxchg. Note that a similar optimisation is possible for a BEQ on the cmpxchg success value. As it's hard to imagine a case where real-world code may do that, this patch doens't handle that case. Differential Revision: https://reviews.llvm.org/D130192
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions