1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib
Craig Topper e457c0b61c [SelectionDAG][ARM][X86] Teach PromoteIntRes_SETCC to do a better job picking the result type for the setcc.
Previously if getSetccResultType returned an illegal type we just fell back to using the default promoted type. This appears to have been to handle the case where for vectors getSetccResultType returns the input type, but the input type itself isn't legal and will need to be promoted. Without the legality check we would never reach a legal type.

But just picking the promoted type to be the setcc type can create strange setccs where the result type is 128 bits and the operand type is 256 bits. If for example the result type was promoted to v8i16 from v8i1, but the input type was promoted from v8i23 to v8i32. We currently handle this with custom lowering code in X86.

This legality check also caused us reject the getSetccResultType when the input type needed to be widened or split. Even though that result wouldn't have caused legalization to get stuck.

This patch tries to fix this by detecting the getSetccResultType needs to be promoted. If its input type also needs to be promoted we'll try a ask for a new setcc result type based on its eventual promoted value. Otherwise we fall back to default type to promote to.

For any other illegal values we might get back from the initial call to getSetccResultType we just keep and allow it to be re-legalized later via splitting or widening or scalarizing.

llvm-svn: 327683
2018-03-15 23:04:11 +00:00
..
Analysis [InstSimplify] peek through unsigned FP casts for sign-bit compares (PR36682) 2018-03-15 16:17:46 +00:00
AsmParser Make the LLParser accept call instructions of variables in the program AS 2018-02-27 11:15:11 +00:00
BinaryFormat DWARF: Unify form size handling code 2018-03-14 09:39:54 +00:00
Bitcode [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
CodeGen [SelectionDAG][ARM][X86] Teach PromoteIntRes_SETCC to do a better job picking the result type for the setcc. 2018-03-15 23:04:11 +00:00
DebugInfo [PDB] Fix a bug where we were serializing hash tables incorrectly. 2018-03-15 22:31:00 +00:00
Demangle
ExecutionEngine [ORC] Re-apply r327566 with a fix for test-global-ctors.ll. 2018-03-15 00:30:14 +00:00
Fuzzer
FuzzMutate [llvm-opt-fuzzer] Add another pack of passes for continuous fuzzing 2018-02-19 11:57:07 +00:00
IR Use standard print(dbgs()) pattern to implement DebugLoc::dump 2018-03-15 22:51:55 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
LTO [LTO] Return proper error object rather than null LTOModule 2018-03-13 04:37:01 +00:00
MC Re-land r327620 "[CodeView] Initial support for emitting S_BLOCK32 symbols for lexical scopes" 2018-03-15 21:24:04 +00:00
Object [WebAssembly] Identify COMDATs by index rather than string. NFC 2018-03-14 15:44:45 +00:00
ObjectYAML Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
Option [NFC] Replace iterators in PrintHelp with range-based for 2018-03-12 18:31:07 +00:00
Passes [New PM][IRCE] port of Inductive Range Check Elimination pass to the new pass manager 2018-03-15 11:01:19 +00:00
ProfileData [SampleFDO] Extend SampleProfReader to handle demangled names. 2018-03-07 16:45:33 +00:00
Support Fix compilation on Darwin with expensive checks. 2018-03-12 11:01:05 +00:00
TableGen TableGen: Explicitly forbid some nestings of class, multiclass, and foreach 2018-03-14 11:01:01 +00:00
Target [SelectionDAG][ARM][X86] Teach PromoteIntRes_SETCC to do a better job picking the result type for the setcc. 2018-03-15 23:04:11 +00:00
Testing
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [LoopUnroll] Peel off iterations if it makes conditions true/false. 2018-03-15 21:34:43 +00:00
WindowsManifest
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt
LLVMBuild.txt