[PATCH] D115392: [SLP] Don't vectorize div/rem with undef denominators

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 11 05:14:56 PST 2021


ABataev added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll:16
   %a7 = extractelement <8 x i32> %a, i32 7
   %ab0 = sdiv i32 %a0, undef
   %ab1 = sdiv i32 %a1, 4
----------------
lebedev.ri wrote:
> RKSimon wrote:
> > lebedev.ri wrote:
> > > lebedev.ri wrote:
> > > > This is an immediate UB https://alive2.llvm.org/ce/z/uKOdmW
> > > (better link: https://alive2.llvm.org/ce/z/oD8gjC)
> > Although https://alive2.llvm.org/ce/z/ma3VyM shows that this patch isn't incorrect either
> Sure, like with all UB we are free to make any refinement to the UB.
> My comment is that this test case is just broken and can be optimized into `system("dd if=/dev/zero of=/dev/sda");`.
> 
I think we can just terminate SLP pass in this case


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115392



More information about the llvm-commits mailing list