[PATCH] D103421: [Constants] Extend support for scalable-vector splats
    Fraser Cormack via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 31 10:58:25 PDT 2021
    
    
  
frasercrmck added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/sub.ll:862
+; CHECK-LABEL: @test44scalablevecminval(
+; CHECK-NEXT:    [[SUB:%.*]] = add <vscale x 2 x i16> [[X:%.*]], shufflevector (<vscale x 2 x i16> insertelement (<vscale x 2 x i16> undef, i16 -32768, i32 0), <vscale x 2 x i16> undef, <vscale x 2 x i32> zeroinitializer)
+; CHECK-NEXT:    ret <vscale x 2 x i16> [[SUB]]
----------------
This isn't combined to `xor` as above because the pattern in `visitSub` uses `m_ImmConstant` which matches `Constant` but explicitly not `ConstantExpr`. Still, it's a call to `isNotMinSignedValue` before it, checking that we don't mis-optimize.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103421/new/
https://reviews.llvm.org/D103421
    
    
More information about the llvm-commits
mailing list