[PATCH] D72740: [SLP] Don't allow Div/Rem as alternate opcodes

Andrei Elovikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 16:23:34 PST 2020


a.elovikov marked an inline comment as done.
a.elovikov added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:386
+static bool isValidForAlternation(unsigned Opcode) {
+  if (Instruction::isIntDivRem(Opcode))
+    return false;
----------------
ABataev wrote:
> What about float point ops?
FP subclasses of llvm::Instruction rely on default floating point environment, so shouldn't throw. If FP operation can produce a signaling NaN it should be represented as constrained intrinsic (via CallInst), which I doubt is handled in this file and should probably bailout for other reasons earlier. At least, I don't see calls to TLI->isFunctionVectorizable in this file.

As such, I'm not aware of any existing issues in this regard. I'll be happy to update the code if you can point me which ones aren't valid and why.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72740





More information about the llvm-commits mailing list