FailedChanges

Summary

  1. [InstSimplify] fold icmp with mul nsw and constant operands (details)
  2. AMDGPU: Fix verifier error with undef source producing s_bitset* (details)
Commit e8760bb9a8a3a22fe22302ffe1932c13c3fcff8e by spatel
[InstSimplify] fold icmp with mul nsw and constant operands

https://rise4fun.com/Alive/slvl

  Name: mul nsw with icmp eq
  Pre: (C2 % C1) != 0
  %a = mul nsw i8 %x, C1
  %r = icmp eq i8 %a, C2
    =>
  %r = false

  Name: mul nsw with icmp ne
  Pre: (C2 % C1) != 0
  %a = mul nsw i8 %x, C1
  %r = icmp ne i8 %a, C2
    =>
  %r = true

Follow-up to the 'nuw' variation added with:
rGf879c9b79621
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul.ll (diff)
The file was modifiedllvm/test/Transforms/InstSimplify/icmp-constant.ll (diff)
Commit 3e52667433881f42ff95ac6775b1ef1a3edd68cd by Matthew.Arsenault
AMDGPU: Fix verifier error with undef source producing s_bitset*

This needs to preserve the undef flag.
The file was modifiedllvm/test/CodeGen/AMDGPU/andorbitset.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp (diff)
The file was addedllvm/test/CodeGen/AMDGPU/shrink-insts-scalar-bit-ops.mir
The file was addedllvm/test/CodeGen/AMDGPU/shrink-insts-undef-reg-verifier-error.ll