[PATCH] D113394: [IR] In ConstantFoldShuffleVectorInstruction use zeroinitializer for splats of 0

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 03:36:13 PST 2021


nikic added inline comments.


================
Comment at: llvm/lib/IR/ConstantFold.cpp:742
+    if (Elt->isZeroValue() && (!isa<ConstantFP>(Elt) ||
+                               cast<ConstantFP>(Elt)->isExactlyValue(+0.0))) {
+      auto *VTy = VectorType::get(EltTy, MaskEltCount);
----------------
Shouldn't this just use `Elt->isNullValue()` instead of `Elt->isZeroValue()`?


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

https://reviews.llvm.org/D113394



More information about the llvm-commits mailing list