llvm-project/llvm/lib
Jessica Clarke 6c80361b84 [SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics
Unlike normal loads these don't have an extension field, but we know
from TargetLowering whether these are sign-extending or zero-extending,
and so can optimise away unnecessary extensions.

This was noticed on RISC-V, where sign extensions in the calling
convention would result in unnecessary explicit extension instructions,
but this also fixes some Mips inefficiencies. PowerPC sees churn in the
tests as all the zero extensions are only for promoting 32-bit to
64-bit, but these zero extensions are still not optimised away as they
should be, likely due to i32 being a legal type.

This also simplifies the WebAssembly code somewhat, which currently
works around the lack of target-independent combines with some ugly
patterns that break once they're optimised away.

Re-landed with correct handling in ComputeNumSignBits for Tmp == VTBits,
where zero-extending atomics were incorrectly returning 0 rather than
the (slightly confusing) required return value of 1.

Reviewed By: RKSimon, atanasyan

Differential Revision: https://reviews.llvm.org/D101342
2021-05-06 04:01:20 +01:00
..
Analysis Make dependency between certain analysis passes transitive (reapply) 2021-05-05 15:17:55 +02:00
AsmParser [Lexer] Allow LLLexer to be used as an API 2021-04-26 12:43:14 -04:00
BinaryFormat [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
Bitcode [Bitcode] Ensure DIArgList in bitcode has no null or forward metadata refs 2021-04-22 12:03:33 +01:00
Bitstream
CodeGen [SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics 2021-05-06 04:01:20 +01:00
DWARFLinker [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
DebugInfo [CodeView] Truncate Long Type Names With An MD5 Hash 2021-05-04 10:51:21 -04:00
Demangle [demangler] Initial support for the new Rust mangling scheme 2021-05-03 16:44:30 -07:00
ExecutionEngine [ORC] Introduce C API for adding object buffers directly to an object layer. 2021-05-05 19:02:13 -07:00
Extensions
FileCheck Fix PR46880: Fail CHECK-NOT with undefined variable 2021-04-20 14:42:46 +01:00
Frontend [OpenMPIRBuilder] Add createOffloadMaptypes and createOffloadMapnames functions 2021-05-03 15:42:32 -04:00
FuzzMutate [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
Fuzzer
IR Preserve metadata on masked intrinsics in auto-upgrade 2021-05-05 15:51:46 -05:00
IRReader [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
InterfaceStub [elfabi] Fix a bug when .dynsym contains no non-local symbol 2021-02-19 11:36:53 -08:00
LTO [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
LineEditor
Linker Linker: Avoid scheduling the link of a global value twice due to an alias 2021-04-28 13:22:10 -07:00
MC [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
MCA [MCA] Fix CarryOver check in the DispatchStage (PR50174). 2021-04-30 14:26:46 +01:00
Object [MC] Untangle MCContext and MCObjectFileInfo 2021-05-05 10:03:02 -07:00
ObjectYAML Reland "AMDGPU/llvm-readobj: Add missing tests for note parsing/displaying" 2021-05-02 22:56:17 -04:00
Option [clang][cli] NFC: Remove ArgList infrastructure for recording queries 2021-02-25 13:53:24 +01:00
Passes [NewPM] Invalidate AAManager after populating GlobalsAA 2021-05-03 16:37:32 -07:00
ProfileData [CSSPGO] Explicitly disallow Binary and Compact Binary profile format for CSSPGO 2021-04-26 09:10:24 -07:00
Remarks [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
Support [SystemZ][z/OS] Fix return values in AutoConversion functions 2021-05-05 09:43:14 -04:00
TableGen [TableGen] Fix two bugs in 'defm' when complex 'assert' is involved. 2021-04-30 11:31:06 -04:00
Target [SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics 2021-05-06 04:01:20 +01:00
Testing [SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN 2021-04-16 10:08:36 -04:00
TextAPI [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
ToolDrivers [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
Transforms [InstCombine] Fully disable select to and/or i1 folding 2021-05-06 09:29:52 +09:00
WindowsManifest
XRay
CMakeLists.txt