FailedChanges

Summary

  1. [UpdateTestChecks][FIX] Python 2.7 compatibility and use right prefix (details)
  2. [SVE] Lower fixed length FP minnum/maxnum (details)
  3. Fix sigaction interceptor to always correctly populate oldact (details)
  4. [X86][GlobalISel] Legalize G_ICMP results to s8. (details)
  5. [X86][SSE] Pull out BUILD_VECTOR operand equivalence tests. NFC. (details)
  6. [ARM] Predicated VFMA patterns (details)
  7. [Scheduler] Fix typo in comments. NFC (details)
  8. [SVE] Remove default-false VectorType::get (details)
  9. Recommit "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and its follow up patches (details)
  10. Fix signed/unsigned comparison warnings. NFC. (details)
  11. [GlobalISel] Implement bit-test switch table optimization. (details)
  12. [WebAssembly] Don't depend on the flags set by handleTargetFeatures in initFeatureMap. (details)
  13. [SVE][VLS] Don't combine logical AND. (details)
  14. [InstCombine] Sanitize undef vector constant to 1 in  X*(2^C) with X << C (PR47133) (details)
  15. [NFC][InstCombine] Add FIXME's for getLogBase2() / visitUDivOperand() (details)
  16. [clang] Check `expr` inside `InitListChecker::UpdateStructuredListElement()` (details)
  17. [libc][obvious] Remove the unused file utils/CPP/StringRef.h. (details)
  18. [WebAssembly] Fixed memory.init always using 64-bit ptr (details)
  19. PR47138: Don't crash if the preferred alignment of an invalid record (details)
  20. [flang][msvc] Tell windows.h to not define min/max macros. (details)
  21. [Target] Cache the command line derived feature map in TargetOptions. (details)
Commit 07448c550457d2afb1e7d69254a58ad44dece3d2 by johannes
[UpdateTestChecks][FIX] Python 2.7 compatibility and use right prefix
The file was modifiedllvm/utils/UpdateTestChecks/common.py
Commit ce2c991061bf81824e84fada848614c18a53fee0 by mcinally
[SVE] Lower fixed length FP minnum/maxnum

Lower fixed length MINNUM/MAXNUM to scalable vectors. Cherry-picked from D71767 with added tests.

Differential Revision: https://reviews.llvm.org/D85744
The file was addedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-minmax.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
Commit fd893bda5576d34dd987d7cfe517a05486cd38f4 by mascasa
Fix sigaction interceptor to always correctly populate oldact

This fixes https://bugs.llvm.org/show_bug.cgi?id=47118. Before this change, when the sigaction interceptor prevented a signal from being changed, it also prevented the oldact output parameter from being written to. This resulted in a use-of-uninitialized-variable by any program that used sigaction for the purpose of reading signals.

This change fixes this: the regular sigaction implementation is still called, but with the act parameter nullified, preventing any changes.

Patch By: IanPudney

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D85797
The file was addedcompiler-rt/test/msan/interception_sigaction_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_signal_interceptors.inc
Commit 5f7cdb2effa213e1bb4cbf765b8bcb5d6604d435 by craig.topper
[X86][GlobalISel] Legalize G_ICMP results to s8.

We need to produce a setcc instruction which has an 8-bit result.
This gets rid of a bunch of cases that were using the s1->s8/s16/s32/s64
handling in selectZExt.

I'm not very familiar with GlobalISel yet so I'm not yet sure
the best way to do things. I'd especially like feedback on the
best way to handle the currently split 32-bit and 64-bit mode
handling.

Differential Revision: https://reviews.llvm.org/D85814
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/legalize-phi.mir
The file was modifiedllvm/lib/Target/X86/X86LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-phi.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/cmp.ll
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/legalize-cmp.mir
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/select-cmp.mir
Commit 13d6cf0951f437d56677271475ce8c8f2111748c by llvm-dev
[X86][SSE] Pull out BUILD_VECTOR operand equivalence tests. NFC.

Pull out element equivalence code from isShuffleEquivalent/isTargetShuffleEquivalent, I've also removed many of the index modulos where possible.

First step toward simply adding some additional equivalence tests.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 1bb348868501d1ae731ec859dfb43433e7e41022 by david.green
[ARM] Predicated VFMA patterns

Similar to the Two op + select patterns that were added recently, this
adds some patterns for select + fma to turn them into predicated
operations.

Differential Revision: https://reviews.llvm.org/D85824
The file was modifiedllvm/test/CodeGen/Thumb2/mve-fmas.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrMVE.td
Commit f07f17ac7c14a611f8a2ba64a7ed76488f86078d by david.green
[Scheduler] Fix typo in comments. NFC
The file was modifiedllvm/include/llvm/MC/MCSchedule.h
Commit 1da09b7214b4e487c371e5d1c5024d92aadc3c7a by ctetreau
[SVE] Remove default-false VectorType::get

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D84212
The file was modifiedllvm/include/llvm/IR/DerivedTypes.h
Commit a7a06ded8b0635268b5db218b3aca0b5b2bfb04a by craig.topper
Recommit "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and its follow up patches

This recommits the following patches now that D85684 has landed

1cf6f210a2e [IR] Disable select ? C : undef -> C fold in ConstantFoldSelectInstruction unless we know C isn't poison.
469da663f2d [InstSimplify] Re-enable select ?, undef, X -> X transform when X is provably not poison
122b0640fc9 [InstSimplify] Don't fold vectors of partial undef in SimplifySelectInst if the non-undef element value might produce poison
ac0af12ed2f [InstSimplify] Add test cases for opportunities to fold select ?, X, undef -> X when we can prove X isn't poison
9b1e95329af [InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms
The file was modifiedclang/test/CodeGen/arm-mve-intrinsics/dup.c
The file was modifiedllvm/test/Transforms/InstCombine/select.ll
The file was modifiedllvm/lib/IR/ConstantFold.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/select.ll
The file was modifiedllvm/test/Transforms/InferAddressSpaces/AMDGPU/select.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 39de63aef9535fece984c3abf161892d1d97b938 by llvm-dev
Fix signed/unsigned comparison warnings. NFC.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 2ff14957e88715dbe760cf94367bd99aff5867db by Amara Emerson
[GlobalISel] Implement bit-test switch table optimization.

This is mostly a straight port from SelectionDAG. We re-use the actual bit-test
analysis part from SwitchLoweringUtils, which was factored out earlier to
support jump-tables.

Differential Revision: https://reviews.llvm.org/D85233
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/irtranslator-switch-bittest.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Commit 2b8ad6b6040833f4f8702721ebaa7749e5c23e60 by craig.topper
[WebAssembly] Don't depend on the flags set by handleTargetFeatures in initFeatureMap.

Properly set "simd128" in the feature map when "unimplemented-simd128"
is requested.

initFeatureMap is used to create the feature vector used by
handleTargetFeatures. There are later calls to initFeatureMap in
CodeGen that were using these flags to recreate the map. But the
original feature vector should be passed to those calls. So that
should be enough to rebuild the map.

The only issue seemed to be that simd128 was not enabled in the
map by the first call to initFeatureMap. Using the SIMDLevel set
by handleTargetFeatures in the later calls allowed simd128 to be
set in the later versions of the map.

To fix this I've added an override of setFeatureEnabled that
will update the map the first time with the correct simd dependency.

Differential Revision: https://reviews.llvm.org/D85806
The file was modifiedclang/lib/Basic/Targets/WebAssembly.h
The file was modifiedclang/lib/Basic/Targets/WebAssembly.cpp
Commit c561f4d2ec19667252c3429ba100c71d38fa3c1d by francesco.petrogalli
[SVE][VLS] Don't combine logical AND.

Testing is performed when targeting 128, 256 and 512-bit wide vectors.

For 128-bit vectors, the original behavior of using NEON instructions is
preserved.

Differential Revision: https://reviews.llvm.org/D85479
The file was addedllvm/test/CodeGen/AArch64/sve-fix-length-and-combine-512.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Commit 12d93a27e7b78d58dd00817cb737f273d2dba8ae by lebedev.ri
[InstCombine] Sanitize undef vector constant to 1 in  X*(2^C) with X << C (PR47133)

While x*undef is undef, shift-by-undef is poison,
which we must avoid introducing.

Also log2(iN undef) is *NOT* iN undef, because log2(iN undef) u< N.

See https://bugs.llvm.org/show_bug.cgi?id=47133
The file was modifiedllvm/test/Transforms/InstCombine/getelementptr.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll
Commit d6f0600c96a6b05ccfe378c9ab9dc0d426f92bd4 by lebedev.ri
[NFC][InstCombine] Add FIXME's for getLogBase2() / visitUDivOperand()

These are not correctness issues.

In visitUDivOperand(), if the (potential) divisor is undef, then udiv is
already UB, so it is not incorrect to keep undef as shift amount.

But, that is suboptimal.
We could instead simply drop that select, picking the other operand.

Afterwards, getLogBase2() could assert that there is no undef in divisor.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
Commit 3fa0a039ab6f856e39dab973df56831b63ed51c5 by platonov.aleksandr
[clang] Check `expr` inside `InitListChecker::UpdateStructuredListElement()`

- Prevent nullptr-deference at try to emit warning for invalid `expr`
- Simplify `InitListChecker::UpdateStructuredListElement()` usages. We do not need to check `expr` and increment `StructuredIndex` (for invalid `expr`) before the call anymore.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D85193
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was addedclang/test/Sema/init-invalid-struct-array.c
Commit 578ac8bfa5e9595f7f4c40dc75e3925d28d91c78 by sivachandra
[libc][obvious] Remove the unused file utils/CPP/StringRef.h.
The file was modifiedlibc/utils/CPP/CMakeLists.txt
The file was removedlibc/utils/CPP/StringRef.h
Commit b52fc59e17044eecdf009f46825f2f44851a3e1d by aardappel
[WebAssembly] Fixed memory.init always using 64-bit ptr

(because the is64 flag was tested incorrectly in LLD).
The file was modifiedlld/wasm/Writer.cpp
Commit 269bc3f5df6c3b75de515a48063c6941ef8fbbe6 by richard
PR47138: Don't crash if the preferred alignment of an invalid record
type is requested.
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/test/SemaCXX/alignof.cpp
Commit e3d38b7b88989835d11b9d134482c17655b5a65d by llvm-project
[flang][msvc] Tell windows.h to not define min/max macros.

Defining macros for min and max breaks using std::min and std::max. Defining NOMINMAX before including the header stops them from being defined.

See https://web.archive.org/web/20170911092732/https://support.microsoft.com/en-us/help/143208/prb-using-stl-in-windows-program-can-cause-min-max-conflicts for details.

This patch is part of the series to [[ http://lists.llvm.org/pipermail/flang-dev/2020-July/000448.html | make flang compilable with MS Visual Studio ]].

Reviewed By: isuruf

Differential Revision: https://reviews.llvm.org/D85656
The file was modifiedflang/runtime/file.cpp
Commit 5c1fe4e20f887286baac6989943a0875e12834fe by craig.topper
[Target] Cache the command line derived feature map in TargetOptions.

We can use this to remove some calls to initFeatureMap from Sema
and CodeGen when a function doesn't have a target attribute.

This reduces compile time of the linux kernel where this map
is needed to diagnose some inline assembly constraints based
on whether sse, avx, or avx512 is enabled.

Differential Revision: https://reviews.llvm.org/D85807
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/Basic/Targets.cpp
The file was modifiedclang/include/clang/Basic/TargetOptions.h
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp