[all-commits] [llvm/llvm-project] 287298: [InstCombine] Fix InstCombinerImpl::foldICmpMulCon...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Feb 14 23:44:06 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2872987e5e91cbda423a3b2be061756a116902b6
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-mul.ll

  Log Message:
  [InstCombine] Fix InstCombinerImpl::foldICmpMulConstant for nsw and nuw mul with unsigned compare.

If we have both an nsw and nuw flag, we would see the nsw flag
first and only handle signed comparisons.

This patch ignores the nsw flag if the comparison isn't signed.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D143766

More information about the All-commits mailing list