[all-commits] [llvm/llvm-project] 293899: [X86] Don't assume an AND/ANDNP element is undef/u...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jul 24 02:54:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 293899c64b75dcad3bf483a10d9acf98198d56c1
      https://github.com/llvm/llvm-project/commit/293899c64b75dcad3bf483a10d9acf98198d56c1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-24 (Sun, 24 Jul 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx512fp16-cvt-ph-w-vl-intrinsics.ll
    M llvm/test/CodeGen/X86/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
    M llvm/test/CodeGen/X86/vector-fshl-512.ll
    M llvm/test/CodeGen/X86/vector-fshl-rot-512.ll
    M llvm/test/CodeGen/X86/vector-fshr-512.ll
    M llvm/test/CodeGen/X86/vector-fshr-rot-512.ll
    M llvm/test/CodeGen/X86/vector-partial-undef.ll
    M llvm/test/CodeGen/X86/vector-rotate-512.ll

  Log Message:
  -----------
  [X86] Don't assume an AND/ANDNP element is undef/undemanded just because one element is undef

For mask ops like these, the other operand's corresponding element might be zero (result = zero) - so we must demand all the bits and that element.

This appears to be what D128570 was trying to fix - both sides of the funnel shift mask of the vXi64 (legalized to v2Xi32) were incorrectly simplifying the upper 32-bit halves to undef, resulting in bad folds later on.

I intend to address the test case regressions, but this close to the release branch I'd prefer to get a fix in first.




More information about the All-commits mailing list