[PATCH] D104932: [instcombine] Fold overflow check using overflow intrinsic to comparison

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 08:25:38 PDT 2021


reames added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3119
       // TODO: Handle vector splats.
       switch (WO->getIntrinsicID()) {
       default:
----------------
spatel wrote:
> Why are we leaving this code in? Is there some pattern that would escape the new proposed block, but still be caught by this?
This is purely a rebase issue.  This code is dead and will be removed.  Oops.  


================
Comment at: llvm/test/Transforms/InstCombine/ssubo.ll:59
 
 define i1 @test_constant4(i8 %a) {
 ; CHECK-LABEL: @test_constant4(
----------------
spatel wrote:
> I focused in on this example, and we are missing a fold:
> https://alive2.llvm.org/ce/z/EfBUXP
> 
> Does that hold for all of the overflow ops? Could we produce the optimal icmp directly (no add with constant necessary)?
Hm, have to give this one some thought.  Would you mind if we did this incrementally?  i.e. land this, then improve?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104932/new/

https://reviews.llvm.org/D104932



More information about the llvm-commits mailing list