[PATCH] D34143: Handling of TRAP during isel

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 23:33:34 PDT 2017


jonpa added a comment.

> Some targets special-case Intrinsic::trap in FastISel; need separate testcases for that (and maybe fixes).
> 
> I'm not sure I agree with the approach; just because it doesn't return doesn't mean you have to mark it a terminator. A call to the C library function abort() is also a "terminator", but we don't treat it as one because it's just simpler to treat it like a regular call.

Does that mean that it is enough to have the hasCtrlDep / hasSideEffects flag, so that it will never be removed rescheduled / removed? What happens in this test case on SystemZ is that any returning argument COPYs will be incorrectly be placed before it, but maybe that doesn't matter in the case of a trapping instruction (?).

Is there any opinion from any other target maintainer on this?


https://reviews.llvm.org/D34143





More information about the llvm-commits mailing list