[PATCH] D82820: [InstCombine] Fix mismatched attribute lists for combined calls
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 13:04:07 PDT 2020
eugenis added inline comments.
================
Comment at: llvm/include/llvm/IR/Attributes.h:691
+ }
+
//===--------------------------------------------------------------------===//
----------------
lebedev.ri wrote:
> vitalybuka wrote:
> > Is this
> > ```
> > AttributeList LdexpAttrs = Attrs.shuffle<-1, 0, 1, 1>(B.getContext());
> > ```
> >
> > about the same as
> >
> > ```
> > AttributeList LdexpAttrs;
> > LdexpAttrs.addAttributes(Ctx, -1, Attrs.getAttributes(-1))
> > LdexpAttrs.addAttributes(Ctx, 0, Attrs.getAttributes(0))
> > LdexpAttrs.addAttributes(Ctx, 1, Attrs.getAttributes(1))
> > LdexpAttrs.addAttributes(Ctx, 2, Attrs.getAttributes(1))
> >
> > ```
> >
> > I think later is easier to read than format.
> > maybe as a for loop
> I'm also worried about readability here.
Agreed. I like the flexibility of Vitaly's example in case you need to go beyond a simple shuffle.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82820/new/
https://reviews.llvm.org/D82820
More information about the llvm-commits
mailing list