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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 11 04:58:47 PST 2021


lebedev.ri 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
----------------
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");`.



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