SuccessChanges

Summary

  1. [SCCP] Add test for predicate info condition handling (NFC) (details)
  2. [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally (details)
Commit 6634aef71f3b5e9820d2955bd6b39d2744de06eb by nikita.ppv
[SCCP] Add test for predicate info condition handling (NFC)
The file was addedllvm/test/Transforms/SCCP/predicateinfo-cond.ll
Commit 66f1dcd872dba189ee054fb016f4bff535fb5afc by tentzen
[Windows SEH] Fix the frame-ptr of a nested-filter within a _finally

This change fixed a SEH bug (exposed by test58 & test61 in MSVC test xcpt4u.c);
when an Except-filter is located inside a finally, the frame-pointer generated today
via intrinsic @llvm.eh.recoverfp is the frame-pointer of the immediate
parent _finally, not the frame-ptr of outermost host function.

The fix is to retrieve the Establisher's frame-pointer that was previously saved in
parent's frame.
The prolog of a filter inside a _finally should be like code below:

%0 = call i8* @llvm.eh.recoverfp(i8* bitcast (@"?fin$0@0@main@@"), i8*%frame_pointer)
%1 = call i8* @llvm.localrecover(i8* bitcast (@"?fin$0@0@main@@"), i8*%0, i32 0)
%2 = bitcast i8* %1 to i8**
%3 = load i8*, i8** %2, align 8

Differential Revision: https://reviews.llvm.org/D77982
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/lib/CodeGen/CGException.cpp
The file was addedclang/test/CodeGen/windows-seh-filter-inFinally.c