[llvm] [ConstantFold][RFC] Fold special constant value with binop absorber f… (PR #109736)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 00:46:58 PDT 2024
https://github.com/nikic requested changes to this pull request.
> The different result is that clang will optimize the result to poison, but hardware doesn't.
What the hardware does here is not relevant, only the semantics specified in LangRef are relevant. Doing what you're doing here may look like it "fixes" the problem, but as long as your input contains undefined behavior, there will always be more cases where is "misbehaves".
Adding LHS support to getBinOpAbsorber() by itself is a reasonable idea, but it would have to be implemented in a way that *preserves* the current behavior for poison.
https://github.com/llvm/llvm-project/pull/109736
More information about the llvm-commits
mailing list