[PATCH] D114375: [SLP]Fix emission of int division with some undef vector subelements.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 22 13:25:13 PST 2021


lebedev.ri requested changes to this revision.
lebedev.ri added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/arith-div-undef.ll:6
 ; CHECK-LABEL: @sdiv_v8i32_undefs(
-; CHECK-NEXT:    ret <8 x i32> poison
 ;
----------------
ABataev wrote:
> lebedev.ri wrote:
> > This is *NOT* a miscompile: https://alive2.llvm.org/ce/z/iMu-eF
> Yes, also checked it via alive but not sure if alive is correct here.
https://llvm.org/docs/LangRef.html#sdiv-instruction
"Division by zero is undefined behavior. For vectors,
if any element of the divisor is zero,
the operation has undefined behavior. "

https://alive2.llvm.org/ce/z/mZvBXL


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114375



More information about the llvm-commits mailing list