[LLVMdev] Proposal: add intrinsics for safe division

Eric Christopher echristo at gmail.com
Fri Apr 25 14:21:41 PDT 2014


> In short, I agree with your observations that these intrinsics are not an
> obvious slam-dunk compared to making the explicit control flow, but I think
> that the intrinsics do give enough flexibility on the LLVM side that it
> would be great if front-ends used them rather than rolling the control flow
> themselves.
>

The problem is that then we have 2 problems: All targets (except for
arm64) then have to lower the intrinsic as the first thing they do
(giving us a TTI pass as the first thing in the pipeline) to take
advantage of the information later during optimization, _and_ we have
to plumb all of the work optimizing the intrinsic as well giving us a
situation where we've now split our optimization efforts as well as
the pain of maintaining an intrinsic that's useful for a single
target.

I really think that this is just solidifying my position that the
intrinsic is a bad idea and that this should be done as later
optimizations.

-eric



More information about the llvm-dev mailing list