[all-commits] [llvm/llvm-project] 425126: [ConstraintElim] Add tests for #78621.

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Feb 6 16:06:03 PST 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 42512617acf38425909676a190ed1b0ce9335616
      https://github.com/llvm/llvm-project/commit/42512617acf38425909676a190ed1b0ce9335616
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-06 (Tue, 06 Feb 2024)

  Changed paths:
    A llvm/test/Transforms/ConstraintElimination/umin-result-may-be-poison.ll

  Log Message:
  -----------
  [ConstraintElim] Add tests for #78621.

Tests with umin where the result may be poison for
https://github.com/llvm/llvm-project/issues/78621.

(cherry picked from commit c83180c1248615cf6ea8842eb4e0cebebba4ab57)


  Commit: 56c50a4e0b50fb59ae1f1b322b31a5546522a928
      https://github.com/llvm/llvm-project/commit/56c50a4e0b50fb59ae1f1b322b31a5546522a928
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-06 (Tue, 06 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/minmax.ll
    M llvm/test/Transforms/ConstraintElimination/umin-result-may-be-poison.ll

  Log Message:
  -----------
  [ConstraintElim] Make sure min/max intrinsic results are not poison.

The result of umin may be poison and in that case the added constraints
are not be valid in contexts where poison doesn't cause UB. Only queue
facts for min/max intrinsics if the result is guaranteed to not be
poison.

This could be improved in the future, by only adding the fact when
solving conditions using the result value.

Fixes https://github.com/llvm/llvm-project/issues/78621.

(cherry picked from commit 3d91d9613e294b242d853039209b40a0cb7853f2)


Compare: https://github.com/llvm/llvm-project/compare/ae6cfa24d6f4...56c50a4e0b50


More information about the All-commits mailing list