llvm-6502/test/CodeGen/Generic
Duncan Sands b0f1e1780c Add a new codegen pass that normalizes dwarf exception handling
code in preparation for code generation.  The main thing it does
is handle the case when eh.exception calls (and, in a future
patch, eh.selector calls) are far away from landing pads.  Right
now in practice you only find eh.exception calls close to landing
pads: either in a landing pad (the common case) or in a landing
pad successor, due to loop passes shifting them about.  However
future exception handling improvements will result in calls far
from landing pads:
(1) Inlining of rewinds.  Consider the following case:
In function @f:
...
  invoke @g to label %normal unwind label %unwinds
...
unwinds:
  %ex = call i8* @llvm.eh.exception()
...

In function @g:
...
  invoke @something to label %continue unwind label %handler
...
handler:
  %ex = call i8* @llvm.eh.exception()
... perform cleanups ...
  "rethrow exception"

Now inline @g into @f.  Currently this is turned into:
In function @f:
...
  invoke @something to label %continue unwind label %handler
...
handler:
  %ex = call i8* @llvm.eh.exception()
... perform cleanups ...
  invoke "rethrow exception" to label %normal unwind label %unwinds
unwinds:
  %ex = call i8* @llvm.eh.exception()
...

However we would like to simplify invoke of "rethrow exception" into
a branch to the %unwinds label.  Then %unwinds is no longer a landing
pad, and the eh.exception call there is then far away from any landing
pads.

(2) Using the unwind instruction for cleanups.
It would be nice to have codegen handle the following case:
  invoke @something to label %continue unwind label %run_cleanups
...
handler:
... perform cleanups ...
  unwind

This requires turning "unwind" into a library call, which
necessarily takes a pointer to the exception as an argument
(this patch also does this unwind lowering).  But that means
you are using eh.exception again far from a landing pad.

(3) Bugpoint simplifications.  When bugpoint is simplifying
exception handling code it often generates eh.exception calls
far from a landing pad, which then causes codegen to assert.
Bugpoint then latches on to this assertion and loses sight
of the original problem.

Note that it is currently rare for this pass to actually do
anything.  And in fact it normally shouldn't do anything at
all given the code coming out of llvm-gcc!  But it does fire
a few times in the testsuite.  As far as I can see this is
almost always due to the LoopStrengthReduce codegen pass
introducing pointless loop preheader blocks which are landing
pads and only contain a branch to another block.  This other
block contains an eh.exception call.  So probably by tweaking
LoopStrengthReduce a bit this can be avoided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-22 20:36:31 +00:00
..
GC Related to PR2911, reject as invalid non-pointer GC roots. 2008-10-25 16:28:35 +00:00
2002-04-14-UnexpectedUnsignedType.ll Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit. 2008-05-20 22:07:21 +00:00
2002-04-16-StackFrameSizeAlignment.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-27-phifcmpd.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-27-useboolinotherbb.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-27-usefsubasbool.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-28-ManyArgs.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-30-BadFoldGEP.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-05-30-BadPreselectPhi.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-07-06-BadIntCmp.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-07-07-BadLongConst.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-07-08-BadCastToBool.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2003-07-29-BadConstSbyte.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2004-02-08-UnwindSupport.ll rename *.llx -> *.ll 2008-04-19 22:29:10 +00:00
2004-05-09-LiveVarPartialRegister.ll rename *.llx -> *.ll 2008-04-19 22:29:10 +00:00
2005-01-18-SetUO-InfLoop.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-04-09-GlobalInPHI.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-07-12-memcpy-i64-length.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-10-18-ZeroSizeStackObject.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-10-21-longlonggtu.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-12-01-Crash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2005-12-12-ExpandSextInreg.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-01-12-BadSetCCFold.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-01-18-InvalidBranchOpcodeAssert.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-02-12-InsertLibcall.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-03-01-dagcombineinfloop.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-04-11-vecload.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-04-26-SetCCAnd.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-04-28-Sign-extend-bool.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-05-06-GEP-Cast-Sink-Crash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-06-12-LowerSwitchCrash.ll Second attempt: 2009-04-29 00:15:41 +00:00
2006-06-13-ComputeMaskedBitsCrash.ll Second attempt: 2009-04-29 00:15:41 +00:00
2006-06-28-SimplifySetCCCrash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-07-03-schedulers.ll The list-td and list-tdrr schedulers don't yet support physreg 2009-01-13 20:24:13 +00:00
2006-08-30-CoalescerCrash.ll some more spelling changes 2008-03-06 10:51:21 +00:00
2006-09-02-LocalAllocCrash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-09-06-SwitchLowering.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-10-27-CondFolding.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-10-29-Crash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-11-06-MemIntrinsicExpand.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-11-20-DAGCombineCrash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2006-12-16-InlineAsmCrash.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
2007-01-15-LoadSelectCycle.ll
2007-02-16-BranchFold.ll Test assumes tail merging is off; this must now be explicit. 2007-05-22 17:18:05 +00:00
2007-02-23-DAGCombine-Miscompile.ll Change the x86 assembly output to use tab characters to separate the 2007-07-31 20:11:57 +00:00
2007-02-25-invoke.ll
2007-04-08-MultipleFrameIndices.ll Don't use * in XFAIL line unless you want it to XFAIL on everything. I don't believe you can use true regular expressions here. It will just look for those keywords. Please test this on sparc and see if they still are xfailed. 2007-07-17 18:08:32 +00:00
2007-04-13-SwitchLowerBadPhi.ll Second attempt: 2009-04-29 00:15:41 +00:00
2007-04-14-BitTestsBadMask.ll
2007-04-17-lsr-crash.ll
2007-04-27-BitTestsBadMask.ll Convert tests using "grep -c ... | grep ..." to use the count script. 2007-08-15 13:49:33 +00:00
2007-04-27-InlineAsm-X-Dest.ll This does not fail anymore 2008-10-10 20:28:32 +00:00
2007-04-27-LargeMemObject.ll This is not failing anymore 2008-10-10 10:15:18 +00:00
2007-04-30-LandingPadBranchFolding.ll
2007-05-03-EHTypeInfo.ll Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register 2007-09-07 11:39:35 +00:00
2007-05-05-Personality.ll Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register 2007-09-07 11:39:35 +00:00
2007-05-15-InfiniteRecursion.ll Fix an infinite recursion in GetNegatedExpression. 2007-05-15 17:05:43 +00:00
2007-06-06-CriticalEdgeLandingPad.ll Add a new codegen pass that normalizes dwarf exception handling 2009-05-22 20:36:31 +00:00
2007-11-21-UndeadIllegalNode.ll Turn on LegalizeTypes, the new type legalization 2008-10-27 08:42:46 +00:00
2007-12-17-InvokeAsm.ll Make invokes of inline asm legal. Teach codegen 2007-12-17 18:08:19 +00:00
2007-12-31-UnusedSelector.ll Fix PR1833 - eh.exception and eh.selector return two 2007-12-31 18:35:50 +00:00
2008-01-25-dag-combine-mul.ll Fix some bugs in SimplifyNodeWithTwoResults where it would call deletenode to 2008-01-26 01:09:19 +00:00
2008-01-30-LoadCrash.ll remove target triple to make this test more "generic" 2008-02-04 18:02:37 +00:00
2008-02-04-Ctlz.ll Teach LegalizeTypes how to expand and promote CTLZ, 2008-02-13 18:01:53 +00:00
2008-02-04-ExtractSubvector.ll Crashes LegalizeTypes with "Do not know how to split 2008-02-04 18:05:42 +00:00
2008-02-20-MatchingMem.ll testcase for PR1133 2008-02-21 05:27:08 +00:00
2008-02-25-NegateZero.ll Fix isNegatibleForFree to not return true for ConstantFP nodes 2008-02-26 07:04:54 +00:00
2008-02-26-NegatableCrash.ll Fix PR2096, a regression introduced with my patch last night. This 2008-02-26 17:09:59 +00:00
2008-08-07-PtrToInt-SmallerInt.ll Don't crash printing the asm for a ConstantExpr PtrToInt just because the int 2008-08-08 06:34:07 +00:00
2009-03-17-LSR-APInt.ll LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now 2009-03-17 23:58:30 +00:00
2009-03-29-SoftFloatVectorExtract.ll Fix PR3899: add support for extracting floats from vectors 2009-03-29 13:51:06 +00:00
2009-04-10-SinkCrash.ll fix two problems with machine sinking: 2009-04-10 16:38:36 +00:00
2009-04-28-i128-cmp-crash.ll Disable the load-shrinking optimization from looking at 2009-04-29 03:45:07 +00:00
add-with-overflow-24.ll For amusement, implement SADDO, SSUBO, UADDO, USUBO 2008-12-10 12:30:42 +00:00
add-with-overflow.ll Test add-with-overflow with fast ISel. 2008-11-24 05:23:38 +00:00
addc-fold2.ll
APIntLoadStore.ll Help DejaGnu avoid pipe-jam by producing less output from certain test cases. 2009-05-16 00:34:42 +00:00
APIntParam.ll Help DejaGnu avoid pipe-jam by producing less output from certain test cases. 2009-05-16 00:34:42 +00:00
APIntSextParam.ll Help DejaGnu avoid pipe-jam by producing less output from certain test cases. 2009-05-16 00:34:42 +00:00
APIntZextParam.ll Help DejaGnu avoid pipe-jam by producing less output from certain test cases. 2009-05-16 00:34:42 +00:00
asm-large-immediate.ll Allow target constants to be illegal types. The target should 2007-08-25 01:00:22 +00:00
badarg6.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
badCallArgLRLLVM.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
badFoldGEP.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
badlive.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
BasicInstrs.ll rename *.llx -> *.ll 2008-04-19 22:29:10 +00:00
bit-intrinsics.ll This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. 2007-08-04 01:51:18 +00:00
bool-to-double.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
bool-vector.ll new testcase for PR1845 2008-01-10 00:30:38 +00:00
BurgBadRegAlloc.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
call2-ret0.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
call-ret0.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
call-ret42.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
call-void.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
cast-fp.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
ConstantExprLowering.ll rename *.llx -> *.ll 2008-04-19 22:29:10 +00:00
constindices.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
debug-info.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
dg.exp sabre brings to my attention that the 'tr' suffix is also obsolete 2008-05-20 21:00:03 +00:00
div-neg-power-2.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
empty-load-store.ll Don't look for leaf values to store when lowering stores of 2008-07-30 18:36:51 +00:00
externally_available.ll Add a new "available_externally" linkage type. This is intended 2009-04-13 05:44:34 +00:00
fastcall.ll Add testcase from bug 2770. 2008-09-08 11:17:54 +00:00
fneg-fabs.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
fp_to_int.ll upgrade this test 2007-11-28 18:22:12 +00:00
fp-to-int-invalid.ll Fix PR 4057, a crash doing float->char const folding. 2009-04-24 21:34:13 +00:00
fpowi-promote.ll
fwdtwice.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
getresult-undef.ll Add support to codegen for getresult instructions with undef operands. 2008-04-23 20:21:29 +00:00
global-ret0.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
hello.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
i128-addsub.ll add testcase for 128-bit add/sub 2007-05-17 18:22:37 +00:00
i128-arith.ll
inline-asm-special-strings.ll wire up support for emitting "special" values from inline asm 2009-03-10 05:37:13 +00:00
intrinsics.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
invalid-memcpy.ll Fix a crash on invalid code due to memcpy lowering. 2007-11-27 22:14:42 +00:00
isunord.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
llvm-ct-intrinsics.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
Makefile
multiple-return-values-cross-block-with-invoke.ll Remove the code from CodeGenPrepare that moved getresult instructions 2008-04-25 18:27:55 +00:00
negintconst.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
nested-select.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
phi-immediate-factoring.ll Convert tests using "| wc -l | grep ..." to use the count script. 2007-08-15 13:36:28 +00:00
pr2625.ll Fix SDISel lowering of zeroinitializer and undef to use ComputeValueVTs. 2008-08-04 23:30:41 +00:00
pr3288.ll Fix a bug in ComputeLinearIndex computation handling multi-level 2009-01-06 22:53:52 +00:00
print-add.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-arith-fp.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-arith-int.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-int.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-mul-exp.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-mul.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
print-shift.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
ret0.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
ret42.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
select-cc.ll Implement split and scalarize for SELECT_CC, fixing PR2504 2008-06-30 02:43:01 +00:00
select.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
shift-int64.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
spillccr.ll Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit. 2008-05-20 22:07:21 +00:00
stack-protector.ll A simple test for stack protectors. This should be valid on all platforms. 2008-11-18 07:34:50 +00:00
stacksave-restore.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
storetrunc-fp.ll new testcase. 2008-01-17 19:47:23 +00:00
switch-crit-edge-constant.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
switch-lower-feature-2.ll Convert tests using "| wc -l | grep ..." to use the count script. 2007-08-15 13:36:28 +00:00
switch-lower-feature.ll Fix some more quoting issues in RUN lines, this time regarding unintended 2008-06-10 16:10:32 +00:00
switch-lower.ll Revert the changes in this testcase until Anton can fix them. 2008-12-24 05:23:34 +00:00
SwitchLowering.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
trap.ll new testcase for llvm.trap. 2008-01-15 22:17:26 +00:00
v-split.ll add testcase that has been sitting in my tree for awhile. 2008-01-17 06:54:09 +00:00
vector-casts.ll Revert accidental testcase reduction 2009-04-27 18:42:40 +00:00
vector-constantexpr.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
vector-identity-shuffle.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00
vector.ll Remove llvm-upgrade and update tests. 2008-02-19 01:41:04 +00:00