jmmartinez added inline comments.
================ Comment at: clang/lib/CodeGen/CGCall.cpp:2030-2031 + bool EnabledForTarget = TEntry->second; + if (EnabledForTarget != EnabledForFunc) + return; + } ---------------- arsenm wrote: > jmmartinez wrote: > > arsenm wrote: > > > Early return breaks the other features > > I did not understand this remark. > > > > If the features are not compatible, we do not add a "target-features" entry > > in the new "FuncAttrs". Then, the old "target-features" entry is kept in > > the Function coming from the builtin. > > > > If you think it would be better to set the target-features in FuncAttrs to > > the old value in any case. If that's the case I've added the following code: > > > > if (EnabledForTarget != EnabledForFunc) { > > FuncAttr.addAttribute(FFeatures); > > return; > > } > You find an incompatible feature and then discontinue processing any further > features by early exiting. I expect this to act like an append to any > features already present. The incompatibility is at an individual feature > level, not the group I see. I changed it to match that behaviour. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159206/new/ https://reviews.llvm.org/D159206 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits