[PATCH] D67087: [X86] Override BuildSDIVPow2 for X86.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 10:23:05 PDT 2019


spatel added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:20110
+  // Make sure the division is a power of 2 or the negation of a power of 2.
+  if (!(Divisor.isPowerOf2() || (-Divisor).isPowerOf2()))
+    return SDValue();
----------------
spatel wrote:
> Does the caller always check this anyway? If so, could just make it an assert.
This question wasn't answered. The only caller is DAGCombiner::visitSDIVLike()?


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

https://reviews.llvm.org/D67087





More information about the llvm-commits mailing list