[PATCH] D37069: [x86] use the IR type of formal args to create assertzext/assertsext and scalar truncate nodes

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 15:02:59 PDT 2017


spatel added a reviewer: efriedma.
spatel added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8734
 
         ArgValues.push_back(getCopyFromParts(DAG, dl, &InVals[i], NumParts,
                                              PartVT, VT, nullptr, AssertOp,
----------------
aaboud wrote:
> Do we still need this?
> It is the reason for the second AssertZext instruction.
I don't think we'll get the 2nd assert for the affected tests with this patch because we trunc to i1, but let me know if you're seeing something else.

But yes, we do need this code - or at least there's some other change needed to account for that part. If I just don't set AssertOp, we'll get these x86 test fails and from what I saw it's because we need extra masking ops without the assert:
Failing Tests (5):
    LLVM :: CodeGen/X86/bool-zext.ll
    LLVM :: CodeGen/X86/illegal-bitfield-loadstore.ll
    LLVM :: CodeGen/X86/negate-i1.ll
    LLVM :: CodeGen/X86/sext-i1.ll
    LLVM :: CodeGen/X86/tail-call-casts.ll



https://reviews.llvm.org/D37069





More information about the llvm-commits mailing list