[PATCH] D144316: [SCEV] Fix FoldID::addInteger(unsigned long I)
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 18 12:29:22 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa53d940cee6f: [SCEV] Fix FoldID::addInteger(unsigned long I) (authored by vitalybuka).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144316/new/
https://reviews.llvm.org/D144316
Files:
llvm/include/llvm/Analysis/ScalarEvolution.h
Index: llvm/include/llvm/Analysis/ScalarEvolution.h
===================================================================
--- llvm/include/llvm/Analysis/ScalarEvolution.h
+++ llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -1300,7 +1300,14 @@
SmallVector<unsigned, 4> Bits;
public:
- void addInteger(unsigned long I) { Bits.push_back(I); }
+ void addInteger(unsigned long I) {
+ if (sizeof(long) == sizeof(int))
+ addInteger(unsigned(I));
+ else if (sizeof(long) == sizeof(long long))
+ addInteger((unsigned long long)I);
+ else
+ llvm_unreachable("unexpected sizeof(long)");
+ }
void addInteger(unsigned I) { Bits.push_back(I); }
void addInteger(int I) { Bits.push_back(I); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144316.498615.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230218/c4519641/attachment.bin>
More information about the llvm-commits
mailing list