[PATCH] D24301: [ConstantFold] Teach how to fold a bitcast of a constant vector with some undef elements.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 02:01:27 PDT 2016


ABataev added a subscriber: ABataev.

================
Comment at: lib/Analysis/ConstantFolding.cpp:234-235
@@ +233,4 @@
+      // Correctly Propagate undef values.
+      for (unsigned j = 0; j != Ratio; ++j)
+        Result.push_back(UndefValue::get(DstEltTy));
+      continue;
----------------
```
Result.append(Ratio, UndefValue::get(DstEltTy));
```
?


https://reviews.llvm.org/D24301





More information about the llvm-commits mailing list