FailedChanges

Summary

  1. [X86] Add masked variable tests for funnel undef/zero argument combines I've avoided 'modulo' masks as we'll SimplifyDemandedBits those in the future, and we just need to check that the shift variable is 'in range'
  2. [x86] narrow 256-bit horizontal ops via demanded elements 256-bit horizontal math ops are an x86 monstrosity (and thankfully have not been extended to 512-bit AFAIK). The two 128-bit halves operate on separate halves of the inputs. So if we don't demand anything in the upper half of the result, we can extract the low halves of the inputs, do the math, and then insert that result into a 256-bit output. All of the extract/insert is free (ymm<-->xmm), so we're left with a narrower (cheaper) version of the original op. In the affected tests based on: https://bugs.llvm.org/show_bug.cgi?id=33758 https://bugs.llvm.org/show_bug.cgi?id=38971 ...we see that the h-op narrowing can result in further narrowing of other math via existing generic transforms. I originally drafted this patch as an exact pattern match starting from extract_vector_elt, but I thought we might see diffs starting from extract_subvector too, so I changed it to a more general demanded elements solution. There are no extra existing regression test improvements from that switch though, so we could go back. Differential Revision: https://reviews.llvm.org/D57841
  3. [X86] Add additional tests for funnel undef/zero argument combines As suggested on D58009
  4. [TargetLowering] refactor setcc folds to fix another miscompile (PR40657) SimplifySetCC still has much room for improvement, but this should fix the remaining problem examples from: https://bugs.llvm.org/show_bug.cgi?id=40657 The initial fix for this problem was rL353615.
  5. [X86][SSE] Add SimplifyDemandedBits test for BLENDVPD
  6. [Local] Delete a redundant check. NFC isInstructionTriviallyDead also performs the use_empty() check.
  7. [yaml2obj] - Fix .dynamic section entries writing for 32bit targets. This was introduced by me in r353613. I tried to fix Big-endian bot and replaced uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>, so it is always 8 bytes and that was obviously incorrect. My intention was to use something like packed<uint> actually, which size is target dependent. Patch fixes this bug and adds a test case, since no bots seems reported this.
Revision 353644 by rksimon:
[X86] Add masked variable tests for funnel undef/zero argument combines

I've avoided 'modulo' masks as we'll SimplifyDemandedBits those in the future, and we just need to check that the shift variable is 'in range'
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/funnel-shift.ll (diff)llvm.src/test/CodeGen/X86/funnel-shift.ll
Revision 353641 by spatel:
[x86] narrow 256-bit horizontal ops via demanded elements

256-bit horizontal math ops are an x86 monstrosity (and thankfully have
not been extended to 512-bit AFAIK).

The two 128-bit halves operate on separate halves of the inputs. So if we
don't demand anything in the upper half of the result, we can extract the
low halves of the inputs, do the math, and then insert that result into a
256-bit output.

All of the extract/insert is free (ymm<-->xmm), so we're left with a
narrower (cheaper) version of the original op.

In the affected tests based on:
https://bugs.llvm.org/show_bug.cgi?id=33758
https://bugs.llvm.org/show_bug.cgi?id=38971
...we see that the h-op narrowing can result in further narrowing of other
math via existing generic transforms.

I originally drafted this patch as an exact pattern match starting from
extract_vector_elt, but I thought we might see diffs starting from
extract_subvector too, so I changed it to a more general demanded elements
solution. There are no extra existing regression test improvements from
that switch though, so we could go back.

Differential Revision: https://reviews.llvm.org/D57841
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/haddsub.ll (diff)llvm.src/test/CodeGen/X86/haddsub.ll
The file was modified/llvm/trunk/test/CodeGen/X86/phaddsub-extract.ll (diff)llvm.src/test/CodeGen/X86/phaddsub-extract.ll
Revision 353640 by rksimon:
[X86] Add additional tests for funnel undef/zero argument combines

As suggested on D58009
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/funnel-shift.ll (diff)llvm.src/test/CodeGen/X86/funnel-shift.ll
Revision 353639 by spatel:
[TargetLowering] refactor setcc folds to fix another miscompile (PR40657)

SimplifySetCC still has much room for improvement, but this should
fix the remaining problem examples from:
https://bugs.llvm.org/show_bug.cgi?id=40657

The initial fix for this problem was rL353615.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetLowering.h (diff)llvm.src/include/llvm/CodeGen/TargetLowering.h
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/setcc-combine.ll (diff)llvm.src/test/CodeGen/X86/setcc-combine.ll
Revision 353638 by rksimon:
[X86][SSE] Add SimplifyDemandedBits test for BLENDVPD
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/CodeGen/X86/combine-sse41-intrinsics.ll (diff)llvm.src/test/CodeGen/X86/combine-sse41-intrinsics.ll
Revision 353637 by maskray:
[Local] Delete a redundant check. NFC

isInstructionTriviallyDead also performs the use_empty() check.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Utils/Local.cpp (diff)llvm.src/lib/Transforms/Utils/Local.cpp
Revision 353636 by grimar:
[yaml2obj] - Fix .dynamic section entries writing for 32bit targets.

This was introduced by me in r353613.

I tried to fix Big-endian bot and replaced
uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>,
so it is always 8 bytes and that was obviously incorrect.

My intention was to use something like packed<uint> actually, which
size is target dependent.

Patch fixes this bug and adds a test case, since no bots seems reported this.
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/tools/yaml2obj/dynamic-section-i386.testllvm.src/test/tools/yaml2obj/dynamic-section-i386.test
The file was modified/llvm/trunk/tools/yaml2obj/yaml2elf.cpp (diff)llvm.src/tools/yaml2obj/yaml2elf.cpp