[PATCH] D71389: [ConstantFold][SVE] Fix constant folding for bitcast.

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 06:52:41 PST 2019


bjope added inline comments.


================
Comment at: llvm/lib/IR/ConstantFold.cpp:572
+    } else if (CE->getOpcode() == Instruction::ShuffleVector &&
+               opc == Instruction::BitCast) {
+      // For splat vector, fold bitcast to splat value.
----------------
Don't you need some check that both sides of the bitcast are vectors with matching number of elements?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71389





More information about the llvm-commits mailing list