llvm-project/llvm/lib
Craig Topper 1a8468ba61 [RISCV] Add a RISCV specific CodeGenPrepare pass.
Initial optimization is to convert (i64 (zext (i32 X))) to
(i64 (sext (i32 X))) if the dominating condition for the basic block
guaranteed the sign bit of X is zero.

This frequently occurs in loop preheaders where a signed induction
variable that can never be negative has been widened. There will be
a dominating check that the 32-bit trip count isn't negative or zero.
The check here is not restricted to that specific case though.

A i32->i64 sext is cheaper than zext on RV64 without the Zba
extension. Later optimizations can often remove the sext from the
preheader basic block because the dominating block also needs a sext to
evaluate the greater than 0 check.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D129732
2022-07-14 10:20:59 -07:00
..
Analysis [SCEV] Avoid creating unnecessary SCEVs for SelectInsts. 2022-07-14 09:23:47 -07:00
AsmParser Remove 'no_sanitize_memtag'. Add 'sanitize_memtag'. 2022-07-13 08:54:41 -07:00
BinaryFormat [Binary] Promote OffloadBinary to inherit from Binary 2022-06-01 18:40:57 -04:00
Bitcode [Bitcode] Report metadata decoding error more gracefully 2022-07-14 16:50:33 +02:00
Bitstream
CodeGen [MachineCombiner] Don't compute the latency of transient instructions 2022-07-14 17:08:14 +00:00
DWARFLinker Re-land "[dsymutil] Account for DW_OP_convert being CU relative" 2022-07-12 18:46:23 -07:00
DWP [llvm] Don't use Optional::getValue (NFC) 2022-06-20 22:45:45 -07:00
DebugInfo [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Debuginfod [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Demangle [MicrosoftDemangle] Set error to true when returning nullptr. 2022-06-08 17:18:09 -07:00
ExecutionEngine [JITLink] Silence unused variable warning. (NFC) 2022-07-14 20:14:22 +09:00
Extensions
FileCheck [FileCheck] Catch missspelled directives. 2022-05-26 11:37:19 +01:00
Frontend [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
FuzzMutate Reland "[FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR." 2022-05-07 13:49:54 +02:00
Fuzzer
IR [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
IRReader
InterfaceStub [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
LTO [LTO][ELF] Add selective --save-temps= option 2022-07-06 10:06:18 -07:00
LineEditor [llvm][lldb] use FindLibEdit.cmake everywhere 2022-05-12 15:59:41 -07:00
Linker [NFC][Metadata] Change MDNode::operands()'s return type from op_range to ArrayRef<MDOperand> 2022-07-14 17:22:32 +02:00
MC [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
MCA [MCA] Allow mca::Instruction-s to be recycled and reused 2022-06-24 15:39:51 -07:00
ObjCopy [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Object [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
ObjectYAML [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Option
Passes Turn on flag to not re-run simplification pipeline. 2022-07-14 06:23:55 -07:00
ProfileData [Support] Change compression::zlib::{compress,uncompress} to use uint8_t * 2022-07-13 16:26:54 -07:00
Remarks Don't use Optional::hasValue (NFC) 2022-06-20 20:05:16 -07:00
Support [CommandLine] --help: print "-o <xxx>" instead of "-o=<xxx>" 2022-07-14 01:28:28 -07:00
TableGen [llvm] Use value instead of getValue (NFC) 2022-07-13 23:11:56 -07:00
Target [RISCV] Add a RISCV specific CodeGenPrepare pass. 2022-07-14 10:20:59 -07:00
Testing [llvm] Use value_or instead of getValueOr (NFC) 2022-06-18 23:07:11 -07:00
TextAPI
ToolDrivers [llvm-lib] Ignore /NODEFAULTLIB flag 2022-07-05 10:27:50 -07:00
Transforms [SimplifyIndVar] Use enum class for ExtendKind. NFC 2022-07-14 10:03:58 -07:00
WindowsDriver [llvm] Don't use Optional::hasValue (NFC) 2022-06-25 21:42:52 -07:00
WindowsManifest [llvm] Fix typo for libxml2 detection 2022-05-17 08:45:31 +00:00
XRay
CMakeLists.txt