1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib
Layton Kifer 8e4f6bb635 [DAGCombiner] Don't create sexts of deleted xors when they were in-visit replaced
Fixes a bug introduced by D91589.

When folding `(sext (not i1 x)) -> (add (zext i1 x), -1)`, we try to replace the not first when possible. If we replace the not in-visit, then the now invalidated node will be returned, and subsequently we will return an invalid sext. In cases where the not is replaced in-visit we can simply return SDValue, as the not in the current sext should have already been replaced.

Thanks @jgorbe, for finding the below reproducer.

The following reduced test case crashes clang when built with `clang -O1 -frounding-math`:

```
template <class> class a {
  int b() { return c == 0.0 ? 0 : -1; }
  int c;
};
template class a<long>;
```

A debug build of clang produces this "assertion failed" error:
```
clang: /home/jgorbe/code/llvm/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:264: void {anonymous}::DAGCombiner::AddToWorklist(llvm::
SDNode*): Assertion `N->getOpcode() != ISD::DELETED_NODE && "Deleted Node added to Worklist"' failed.
```

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D93274
2020-12-23 16:16:26 -08:00
..
Analysis Revert "[IRSim] Adding support for isomorphic predicates" 2020-12-23 15:14:19 -06:00
AsmParser [DebugInfo] Support Fortran 'use <external module>' statement. 2020-12-18 13:10:57 -05:00
BinaryFormat [XCOFF][AIX] Emit EH information in traceback table 2020-12-16 09:34:59 -05:00
Bitcode [DebugInfo] Support Fortran 'use <external module>' statement. 2020-12-18 13:10:57 -05:00
Bitstream
CodeGen [DAGCombiner] Don't create sexts of deleted xors when they were in-visit replaced 2020-12-23 16:16:26 -08:00
DebugInfo [llvm-symbolizer][Windows] Add start line when searching in line table sections. 2020-12-17 07:57:36 -08:00
Demangle
DWARFLinker
ExecutionEngine [MCA, ExecutionEngine, Object] Use llvm::is_contained (NFC) 2020-12-18 09:09:04 -08:00
Extensions
FileCheck [FileCheck] Add a literal check directive modifier 2020-12-18 17:26:15 -08:00
Frontend [OpenMPIRBuilder] Various changes required for tileLoops. 2020-12-11 11:37:45 -06:00
Fuzzer
FuzzMutate
InterfaceStub
IR Make NPM OptBisectInstrumentation use global singleton OptBisect 2020-12-20 13:47:56 -08:00
IRReader
LineEditor
Linker
LTO [NFC] Reduce include files dependency and AA header cleanup (part 2). 2020-12-17 14:04:48 +03:00
MC [MC] Split MCContext::createTempSymbol, default AlwaysAddSuffix to true, and add comments 2020-12-21 14:04:13 -08:00
MCA
Object Replace T(x) with reinterpret_cast<T>(x) everywhere it means reinterpret_cast. NFC. 2020-12-22 19:54:29 -05:00
ObjectYAML [obj2yaml][yaml2obj] - Add AArch64 STO_AARCH64_VARIANT_PCS support 2020-12-17 11:09:53 -03:00
Option
Passes [NewPM] Fix objc-arc-apelim pass typo 2020-12-22 21:40:43 -08:00
ProfileData [NFC][SampleFDO] Preparation to support multiple sections with the same type 2020-12-16 22:28:45 -08:00
Remarks
Support [AArch64] Add support for the Branch Record Buffer extension 2020-12-18 11:11:06 +00:00
TableGen [TableGen] Add the !substr() bang operator 2020-12-23 10:59:33 -05:00
Target [AMDGPU] Fix adjustWritemask subreg handling 2020-12-23 14:43:31 -08:00
Testing
TextAPI
ToolDrivers
Transforms [InstCombine] canonicalizeAbsNabs(): don't propagate NSW flag for NABS patter 2020-12-24 00:06:09 +03:00
WindowsManifest
XRay
CMakeLists.txt