Changes

Changes from Git (git https://github.com/llvm/llvm-project.git)

Summary

  1. [InstCombine] move/add tests for icmp with mul operands; NFC (details)
  2. [InstCombine] improve folds for icmp with multiply operands (PR47432) (details)
Commit 11d8eedfa5b796a9ba0276a5e4bad8b9e549f0b6 by spatel
[InstCombine] move/add tests for icmp with mul operands; NFC
The file was modifiedllvm/test/Transforms/InstCombine/icmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
Commit 7a6d6f0f7046f6ebcbf06eaf8f996d991a90e440 by spatel
[InstCombine] improve folds for icmp with multiply operands (PR47432)

Check for no overflow along with an odd constant before
we lose information by converting to bitwise logic.

https://rise4fun.com/Alive/2Xl

  Pre: C1 != 0
  %mx = mul nsw i8 %x, C1
  %my = mul nsw i8 %y, C1
  %r = icmp eq i8 %mx, %my
  =>
  %r = icmp eq i8 %x, %y

  Name: nuw ne
  Pre: C1 != 0
  %mx = mul nuw i8 %x, C1
  %my = mul nuw i8 %y, C1
  %r = icmp ne i8 %mx, %my
  =>
  %r = icmp ne i8 %x, %y

  Name: odd ne
  Pre: C1 % 2 != 0
  %mx = mul i8 %x, C1
  %my = mul i8 %y, C1
  %r = icmp ne i8 %mx, %my
  =>
  %r = icmp ne i8 %x, %y
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp