[PATCH] D26716: DAG: Ignore call site attributes when emitting target intrinsic
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 11:57:21 PST 2016
arsenm added a comment.
In https://reviews.llvm.org/D26716#597575, @efriedma wrote:
> Why can't you just compute whether the intrinsic has a chain based on the IntrinsicInfo? Checking for a readnone attribute in the IR seems dubious at best; an intrinsic can be both readnone and require a chain (for example, it could have undefined behavior for some inputs).
In https://reviews.llvm.org/D26716#601558, @efriedma wrote:
> llvm.sqrt is a readnone intrinsic which can exhibit undefined behavior, but I think we don't actually generate a chain for it at the moment, so maybe we can get away with querying whether the intrinsic is readnone. But the right way to do that is to call Intrinsic::getAttributes; we can't trust the IR to have the right attributes on the declaration (it's not something the verifier checks).
Intrinsic declarations do have the right attributes on the declaration. The Function constructor ensures they are added.
https://reviews.llvm.org/D26716
More information about the llvm-commits
mailing list