[PATCH] D110867: X86InstrInfo: Support immediates that are +1/-1 different in optimizeCompareInstr
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 09:01:42 PDT 2021
MatzeB added a comment.
Thanks for reporting!
> I suspect what's happening is that this transformation figures the second cmp is redundant if it changes "jle bar" to "jl bar", but it doesn't take into account that the "je baz" was also depending on that second cmp.
The optimization should have detected EFLAGS being live out of the bar block in your example and abort because there could potentially be more users (see line 4550).
Is there a way to reproduce this easily?
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