[PATCH] D110867: X86InstrInfo: Support immediates that are +1/-1 different in optimizeCompareInstr

Bogdan Graur via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 06:18:19 PST 2021


bgraur added a comment.

In D110867#3183005 <https://reviews.llvm.org/D110867#3183005>, @lebedev.ri wrote:

> In D110867#3182991 <https://reviews.llvm.org/D110867#3182991>, @bgraur wrote:
>
>> We have root caused to this revision a mis-compile affecting `AMD Rome` machines.
>> I have attached a reproducer program that shows the problem when compiled with `-O2` or `-O3`.
>>
>> Please revert this change until you have a chance to look at the problem.
>>
>> NOTE: the repro uses the abseil library that can be found at https://github.com/abseil/abseil-cpp.
>> The reproducer might probably be reduced more (if needed) but it would be great if you could revert early.
>>
>> Reproducer: F20964863: repro_git.cc <https://reviews.llvm.org/F20964863>
>
> Please post standalone reproducer, one that does not require guessing versions of external dependecies,
> and the actual reproduction steps, as in the actual complete compilation and run command.

Reduced reproducer: F20977641: reduced.cc <https://reviews.llvm.org/F20977641>

  clang -O3 -std=gnu++17 -fsized-deallocation -x c++ reduced.cc -lc++abi -pthread -static -o repro

`./repro` is expected to **always** return `0`.
It will return `0` on `intel` machines and `186` on `amd` when built with `clang` at this revision.
It will return `0` on all machines when built with clang a previous version.

Please revert and let's work together after that if you need more info.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110867/new/

https://reviews.llvm.org/D110867



More information about the llvm-commits mailing list