[PATCH] D113035: [InstCombine] enhance vector bitwise select matching

Bing Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 20:35:46 PST 2021


yubing added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2313
+    A = peekThroughBitcast(A);
+    unsigned NumSignBits = ComputeNumSignBits(A);
+    if (NumSignBits == A->getType()->getScalarSizeInBits() &&
----------------
I think we should check if A is Integer vector after A = peekThroughBitcast(A);
A might be  %astype = bitcast <4 x float> %c to <4 x i32>
when you peek through A, A become <4 x float> %c which can't be handled with ComputeNumSignBits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113035



More information about the llvm-commits mailing list