[PATCH] D117552: [Attributes] Make attribute addition behavior consistent

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 22:30:34 PST 2022


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/IR/Attributes.cpp:1737
   for (unsigned Index = 0; Index < Attribute::NumIntAttrKinds; ++Index)
-    if (!IntAttrs[Index])
+    if (B.IntAttrs[Index])
       IntAttrs[Index] = B.IntAttrs[Index];
----------------
It seems to me this could just be `IntAttrs |= B.IntAttrs` which is probably faster. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117552/new/

https://reviews.llvm.org/D117552



More information about the llvm-commits mailing list