llvm-project/llvm/unittests/Transforms/Utils
Vedant Kumar b2a6f8e505 [CodeExtractor] Store outputs at the first valid insertion point
When CodeExtractor outlines values which are used by the original
function, it must store those values in some in-out parameter. This
store instruction must not be inserted in between a PHI and an EH pad
instruction, as that results in invalid IR.

This fixes the following verifier failure seen while outlining within
ObjC methods with live exit values:

  The unwind destination does not have an exception handling instruction!
    %call35 = invoke i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* %exn.adjusted, i8* %1)
            to label %invoke.cont34 unwind label %lpad33, !dbg !4183
  The unwind destination does not have an exception handling instruction!
    invoke void @objc_exception_throw(i8* %call35) #12
            to label %invoke.cont36 unwind label %lpad33, !dbg !4184
  LandingPadInst not the first non-PHI instruction in the block.
    %3 = landingpad { i8*, i32 }
            catch i8* null, !dbg !1411

rdar://46540815

llvm-svn: 348562
2018-12-07 03:01:54 +00:00
..
ASanStackFrameLayoutTest.cpp [asan] Add a full redzone after every stack variable 2017-11-18 01:13:18 +00:00
BasicBlockUtilsTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
CMakeLists.txt [LoopUnroll] Add check to Latch's terminator in UnrollRuntimeLoopRemainder 2018-09-25 10:08:47 +00:00
CloningTest.cpp [DebugInfo] DISubprogram flags get their own flags word. NFC. 2018-11-19 18:29:28 +00:00
CodeExtractorTest.cpp [CodeExtractor] Store outputs at the first valid insertion point 2018-12-07 03:01:54 +00:00
FunctionComparatorTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
IntegerDivisionTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
LocalTest.cpp Fix -Wdangling-else gcc warning. NFCI. 2018-09-16 12:30:41 +00:00
SSAUpdaterBulkTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
UnrollLoopTest.cpp [LoopUnroll] Add check to Latch's terminator in UnrollRuntimeLoopRemainder 2018-09-25 10:08:47 +00:00
ValueMapperTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00