aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/CodeGen/MachineInstrTest.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2021-05-05 15:32:34 +0100
committerJessica Clarke <jrtc27@jrtc27.com>2021-05-05 16:34:45 +0100
commit6e876f9dedf00b24a96b8781e3b39d5282c43e91 (patch)
treec25dd19ea37e06b7b19d62c1fcc2d69f00004c3c /llvm/unittests/CodeGen/MachineInstrTest.cpp
parenta3d273c9ff4c789aec0dc743fa2dc846b5987312 (diff)
downloadllvm-6e876f9dedf00b24a96b8781e3b39d5282c43e91.zip
llvm-6e876f9dedf00b24a96b8781e3b39d5282c43e91.tar.gz
llvm-6e876f9dedf00b24a96b8781e3b39d5282c43e91.tar.bz2
[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. Reviewed By: RKSimon, atanasyan Differential Revision: https://reviews.llvm.org/D101342
Diffstat (limited to 'llvm/unittests/CodeGen/MachineInstrTest.cpp')
0 files changed, 0 insertions, 0 deletions