[all-commits] [llvm/llvm-project] 3d91d9: [ConstraintElim] Make sure min/max intrinsic resul...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jan 24 06:26:51 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d91d9613e294b242d853039209b40a0cb7853f2
      https://github.com/llvm/llvm-project/commit/3d91d9613e294b242d853039209b40a0cb7853f2
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-01-24 (Wed, 24 Jan 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.




More information about the All-commits mailing list