[PATCH] D14842: [WinEH] Fix two cases where instructions can incorrectly be inserted into EH pads
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 13:12:07 PST 2015
andrew.w.kaylor created this revision.
andrew.w.kaylor added reviewers: JosephTremoulet, rnk, majnemer.
andrew.w.kaylor added a subscriber: llvm-commits.
andrew.w.kaylor set the repository for this revision to rL LLVM.
I came across two cases where instructions were being inserted above EH pad instructions that don't allow non-PHI instructions before the terminator. In one case, CodeGenPrepare was trying to sink a bitcast into a catchpad. In another case, GVN was trying to PRE a load in front of a catchpadend.
The precise conditions under which these circumstances arise are a bit involved, I think. I saw it on a branched project while compiling template-based code and couldn't come up with reduced C++ code that reproduces the problem on trunk, but both of the new IR test cases I'm adding failed for me before I applied my code changes.
Repository:
rL LLVM
http://reviews.llvm.org/D14842
Files:
lib/CodeGen/CodeGenPrepare.cpp
lib/Transforms/Scalar/GVN.cpp
test/Transforms/CodeGenPrepare/catchpad-phi-cast.ll
test/Transforms/GVN/pre-load.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14842.40698.patch
Type: text/x-patch
Size: 5169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151119/a8a17bda/attachment.bin>
More information about the llvm-commits
mailing list