[PATCH] D82820: [InstCombine] Fix mismatched attribute lists for combined calls
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 07:34:07 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/include/llvm/IR/Attributes.h:691
+ }
+
//===--------------------------------------------------------------------===//
----------------
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.
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