projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afad153
)
[RISCV] Use llvm::rotl (NFC)
author
Kazu Hirata
<kazu@google.com>
Tue, 14 Feb 2023 04:16:48 +0000
(20:16 -0800)
committer
Kazu Hirata
<kazu@google.com>
Tue, 14 Feb 2023 04:16:48 +0000
(20:16 -0800)
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
index
5790872
..
f4e227c
100644
(file)
--- a/
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
+++ b/
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
@@
-358,8
+358,7
@@
InstSeq generateInstSeq(int64_t Val, const FeatureBitset &ActiveFeatures) {
ActiveFeatures[RISCV::FeatureVendorXTHeadBb])) {
if (unsigned Rotate = extractRotateInfo(Val)) {
RISCVMatInt::InstSeq TmpSeq;
- uint64_t NegImm12 =
- ((uint64_t)Val >> (64 - Rotate)) | ((uint64_t)Val << Rotate);
+ uint64_t NegImm12 = llvm::rotl<uint64_t>(Val, Rotate);
assert(isInt<12>(NegImm12));
TmpSeq.emplace_back(RISCV::ADDI, NegImm12);
TmpSeq.emplace_back(ActiveFeatures[RISCV::FeatureStdExtZbb]