[all-commits] [llvm/llvm-project] 43c6fb: [InstCombine] Update the `select` operand when the...

c8ef via All-commits all-commits at lists.llvm.org
Sat Aug 24 04:57:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 43c6fb29a64b9443367bf4085a11ca68f7cd4492
      https://github.com/llvm/llvm-project/commit/43c6fb29a64b9443367bf4085a11ca68f7cd4492
  Author: c8ef <c8ef at outlook.com>
  Date:   2024-08-24 (Sat, 24 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    A llvm/test/Transforms/InstCombine/fold-select-trunc.ll

  Log Message:
  -----------
  [InstCombine] Update the `select` operand when the `cond` is `trunc` and has the `nuw` or `nsw` property.  (#105914)

This patch updates the select operand when the cond has the nuw or nsw
property. Considering the semantics of the nuw and nsw flag, if there is
no poison value in this expression, this code assumes that X can only be
0, 1 or -1.

close: #96765
alive2: https://alive2.llvm.org/ce/z/3n3n2Q



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