[PATCH] D32273: [X86][AVX512] Make i1 illegal in the CodeGen

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 11:29:52 PDT 2017


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM - I'm happy for the missed constant fold to be handled in a followup, add a TODO if you can.



================
Comment at: test/CodeGen/X86/avx512-intrinsics.ll:125
+; CHECK-NEXT:    kxnorw %k0, %k0, %k1
+; CHECK-NEXT:    kxnorw %k1, %k0, %k0
 ; CHECK-NEXT:    kmovw %k0, %eax
----------------
guyblank wrote:
> RKSimon wrote:
> > Any ideas what is going on here?
> SelectionDAG.cpp::FoldConstantArithmetic should eliminate this.
> but there is a comment there...
> // Avoid BUILD_VECTOR nodes that perform implicit truncation.
> // FIXME: This is valid and could be handled by truncation.
> 
> without this patch the build vector was v16i1 = build vector i1, i1, ...
> and with the patch it is v16i1 = build vector i8, i8, ...
> so now it is unable to eliminate the xnor.
> 
> i've tried implementing proper handling for implicit truncation but i'm getting some failure in mips that i still need to investigate.
> is it ok if I fix it in a separate commit?
> 
> 
SelectionDAG::FoldConstantVectorArithmetic does the explicit truncation/extension - not sure if you can use that.


https://reviews.llvm.org/D32273





More information about the llvm-commits mailing list