[llvm] [GlobalISel] Fix store merging incorrectly classifying an unknown index expr as 0. (PR #90375)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 27 23:09:46 PDT 2024
================
@@ -35,11 +35,29 @@ struct LegalityQuery;
class MachineRegisterInfo;
namespace GISelAddressing {
/// Helper struct to store a base, index and offset that forms an address
-struct BaseIndexOffset {
+class BaseIndexOffset {
+private:
Register BaseReg;
Register IndexReg;
- int64_t Offset = 0;
- bool IsIndexSignExt = false;
+ std::optional<int64_t> Offset;
+
+public:
+ BaseIndexOffset() = default;
+ BaseIndexOffset(Register Base, Register Index, bool IsIndexSignExt)
----------------
tschuett wrote:
The constructor is unused and there is no member variable.
https://github.com/llvm/llvm-project/pull/90375
More information about the llvm-commits
mailing list