Open Quuxplusone opened 4 years ago
Bugzilla Link | PR43906 |
Status | CONFIRMED |
Importance | P enhancement |
Reported by | David Bolvansky (david.bolvansky@gmail.com) |
Reported on | 2019-11-05 05:04:00 -0800 |
Last modified on | 2021-10-08 19:30:22 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | bruno.cardoso@gmail.com, craig.topper@gmail.com, dblaikie@gmail.com, dushistov@gmail.com, francisvm@yahoo.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com |
Fixed by commit(s) | |
Attachments | |
Blocks | PR30996 |
Blocked by | |
See also |
Wow - this has been here since 2015!
Adding this assert:
assert((Offset == 0 || MV.getConstant() == 0) && "Illegal offset accumulation");
Offset = -MV.getConstant();
Results in the test failures:
Failing Tests (2):
LLVM :: MC/MachO/ARM/cstexpr-gotpcrel.ll
LLVM :: MC/MachO/cstexpr-gotpcrel-32.ll
Did you try
Offset -= MV.getConstant();
and run tests?
CC'ing people who have touched those tests.
(In reply to David Bolvansky from comment #3)
> Did you try
>
> Offset -= MV.getConstant();
>
> and run tests?
Of course, there are changes but I'm not familiar with the tests and would
prefer someone who is familiar with them to make the changes.
Hey folks.
Offset -= MV.getConstant();
sounds like different semantics to me. It's been a while since I wrote this so I don't remember the details anymore, but looks like the intention was solely to negate MV.getConstant().
I'm not directly working with this code anymore, but I'm happy to review a change that pass all tests.