[PATCH] D37017: [DAGCombiner] fold assertzexts separated by trunc

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 22 14:14:27 PDT 2017


aaboud added a comment.

I have one comment below.
By the way, I noticed that the double AssertZero occur only for the x86_64 (in i386 it does not happen).
It might be worth checking where it comes from, regardless of this patch.



================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7925
+    EVT BigAZVT = cast<VTSDNode>(BigAZ.getOperand(1))->getVT();
+    if (AssertVT.getSizeInBits() < BigAZVT.getSizeInBits()) {
+      SDLoc DL(N);
----------------
What about the other case:
assert (trunc (assert X, i1) to iN), i8 --> trunc (assert X, i1) to iN

Do not we want to cover this as well?
Or we are sure that such case will never occur?


https://reviews.llvm.org/D37017





More information about the llvm-commits mailing list