llvm-capstone/llvm/lib
Craig Topper 70046438d0 [RISCV] Only try LUI+SH*ADD+ADDI for int materialization if LUI+ADDI+SH*ADD failed.
There's an assert in LUI+SH*ADD+ADDI materialization that makes sure the
lower 12 bits aren't zero since that case should have been handled as
LUI+ADDI+SH*ADD. But nothing prevented the LUI+SH*ADD+ADDI checks from
running after the earlier code handled it.

The sequence would be the same length or longer so it wouldn't replace
the earlier sequence, but the assert happened before that was checked.

The vector holding the sequence also wasn't reset before the second
check so that guaranteed the sequence would never be found to be
shorter.

This patch fixes this by only trying the second expansion when the
earlier fails.

Fixes PR54812.

Reviewed By: benshi001

Differential Revision: https://reviews.llvm.org/D123406
2022-04-09 08:52:15 -07:00
..
Analysis [CaptureTracking] Ignore ephemeral values in EarliestEscapeInfo 2022-04-08 10:07:26 -07:00
AsmParser [LLVMContext] Replace enableOpaquePointers() with setOpaquePointers() 2022-04-05 12:02:48 +02:00
BinaryFormat [CUDA] Add CUDA fatbinary magic 2022-03-14 20:08:31 -04:00
Bitcode DebugInfo: Make the simplified template names prefix more unique 2022-04-06 18:25:46 +00:00
Bitstream [Bitstream] Remove pessimizing move 2022-02-16 08:23:02 +01:00
CodeGen Transforms: Fix code duplication between LowerAtomic and AtomicExpand 2022-04-08 19:06:36 -04:00
DebugInfo [llvm-pdbutil] Move global state (Filters) inside LinePrinter class. 2022-04-08 14:54:55 +01:00
Debuginfod Fix buildbot failures from 7917b3c6. 2022-03-21 17:58:22 +00:00
Demangle [demangler] Node precision dumper 2022-04-06 14:04:15 -07:00
DWARFLinker Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
DWP Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
ExecutionEngine [ORC] Fix handling of casts in llvm.global_ctors. 2022-04-07 17:06:38 -07:00
Extensions
FileCheck
Frontend [OpenMPIRBuilder] Detect and fix ambiguous InsertPoints for createSections. 2022-04-05 12:36:29 -05:00
Fuzzer
FuzzMutate Revert "[FuzzMutate] Don't insert instructions after musttail call" 2022-03-16 17:29:27 +01:00
InterfaceStub Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
IR MemoryBuiltins: also check function definition for allocalign 2022-04-07 12:38:44 -04:00
IRReader
LineEditor [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
Linker [PseudoProbe] Do not emit pseudo probes when module is not probed. 2022-03-25 12:59:53 -07:00
LTO Apply clang-tidy fixes for readability-redundant-smartptr-get in SummaryBasedOptimizations.cpp (NFC) 2022-03-28 09:18:31 -07:00
MC [MC][ELF] Improve st_size propagation rule 2022-04-08 10:06:44 -07:00
MCA [MCA] Removed unused variable. 2022-03-13 21:55:56 -07:00
ObjCopy [Support/Hash functions] Change the final() and result() of the hashing functions to return an array of bytes 2022-04-05 21:38:06 -07:00
Object Apply clang-tidy fixes for readability-redundant-smartptr-get in TapiUniversal.cpp (NFC) 2022-03-28 09:18:36 -07:00
ObjectYAML [WebAssembly] Rename member in WasmYAML.h to avoid compiler warning 2022-03-14 09:09:43 -07:00
Option
Passes Transforms: Split LowerAtomics into separate Utils and pass 2022-04-06 20:54:45 -04:00
ProfileData [memprof] Deduplicate and outline frame storage in the memprof profile. 2022-04-08 09:15:20 -07:00
Remarks Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
Support No reason for these not to have prototypes; NFC 2022-04-08 18:53:23 -04:00
TableGen [mlir] Split out AttrDef/TypeDef and pattern constructs from OpBase.td 2022-03-15 00:18:03 -07:00
Target [RISCV] Only try LUI+SH*ADD+ADDI for int materialization if LUI+ADDI+SH*ADD failed. 2022-04-09 08:52:15 -07:00
Testing Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
TextAPI Cleanup LLVMTextAPI headers 2022-01-26 14:21:25 +01:00
ToolDrivers
Transforms [VPlan] Model pre-header explicitly. 2022-04-09 14:19:47 +02:00
WindowsDriver Cleanup includes: WindowsDriver & WindowsManifest 2022-03-10 17:19:06 +01:00
WindowsManifest Cleanup includes: WindowsDriver & WindowsManifest 2022-03-10 17:19:06 +01:00
XRay [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
CMakeLists.txt [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library. 2022-02-17 13:11:42 +03:00