[all-commits] [llvm/llvm-project] c22f56: [LICM] Drop poison-generating flags when reassocia...
Justin Lebar via All-commits
all-commits at lists.llvm.org
Sat May 30 00:55:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c22f5665a9d631742a58e87b80b15359f65b3a66
https://github.com/llvm/llvm-project/commit/c22f5665a9d631742a58e87b80b15359f65b3a66
Author: Justin Lebar <justin.lebar at gmail.com>
Date: 2026-05-30 (Sat, 30 May 2026)
Changed paths:
M llvm/lib/Transforms/Scalar/LICM.cpp
M llvm/test/Transforms/LICM/hoist-add-sub.ll
Log Message:
-----------
[LICM] Drop poison-generating flags when reassociating an icmp (#200344)
`hoistAdd`/`hoistSub` turn `LV + C1 <pred> C2` into `LV <pred> C2 - C1`,
changing the icmp's LHS. A `samesign` flag asserted about the old
operands need not hold for the new LHS, so keeping it can turn a defined
comparison into poison (e.g. for `%iv = -3`, `samesign slt(2, 100)` is
true but the reassociated `samesign slt(-3, 95)` has
opposite-sign operands → poison). Drop the icmp's poison-generating
flags after the rewrite, as `hoistMulAddAssociation` already does.
This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list