[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute
krishna chaitanya sankisa via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 26 19:30:14 PDT 2022
skc7 added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2435
DetermineNoUndef(ParamType, getTypes(), DL, AI)) {
- Attrs.addAttribute(llvm::Attribute::NoUndef);
+ if(!FuncAttrs.contains(llvm::Attribute::Convergent))
+ Attrs.addAttribute(llvm::Attribute::NoUndef);
----------------
arsenm wrote:
> Missing space before (.
>
> Needs comment explaining this
Updated
================
Comment at: llvm/test/Transforms/SimplifyCFG/tautological-conditional-branch-convergent-noundef.ll:26
+ %i3 = phi double [%i2, %bb2], [undef, %bb1]
+ %i4 = call noundef double @two(double %i3, i1 %i1)
+ ret void
----------------
arsenm wrote:
> Aren't the cases with defined handling of undef lanes still defined for the result?
ret double %i4?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124158/new/
https://reviews.llvm.org/D124158
More information about the cfe-commits
mailing list