[PATCH] D31359: [GlobalISel]: Allow backends to custom legalize Intrinsics

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 13:34:44 PDT 2017


aditya_nandakumar added a comment.

In https://reviews.llvm.org/D31359#713440, @t.p.northover wrote:

> > It's entirely possible that the intermediate instructions may fail legalization (for e.g. missing LegalizeActions/custom lowering of other intrinsics etc).
>
> And then reporting an error on those would be fine, surely? I don't see why we have to defer deleting an instruction by passing a weird success code up the stack.


The latest proposal was to move the reportGISelFailure into legalizeInstr (right where we return UnableToLegalize). That way we report failure on the first instruction that fails (whether it's the original instruction or an intermediate one). There's no need to pass up weird success code up the stack or defer it for later. The backend (intrinsic Lowering) can erase the instruction and return success as before.


Repository:
  rL LLVM

https://reviews.llvm.org/D31359





More information about the llvm-commits mailing list