[PATCH] D53987: [ValueTracking] peek through 2-input shuffles in ComputeNumSignBits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 03:48:46 PDT 2018


RKSimon added inline comments.


================
Comment at: lib/Analysis/ValueTracking.cpp:2526
+    Tmp = std::numeric_limits<unsigned>::max();
+    if (!isa<UndefValue>(U->getOperand(0))) {
+      Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q);
----------------
Don't you still have to check if a valid shuffle mask element references an UNDEF operand?
```
%1 = shufflevector <4 x float> %a0, <4 x float> undef, <4 x i32> <i32 4, i32 5, i32 0, i32 1>
```
Or is that guaranteed to have already been handled, the mask element set to undef and caught by containsUndefElement() ?


https://reviews.llvm.org/D53987





More information about the llvm-commits mailing list