================
@@ -13,7 +13,10 @@ void init(void * 
__attribute__((pass_dynamic_object_size(0))));
 // CHECK-LABEL: define dso_local void @_ZN3foo3barC1Ev(
 // CHECK-SAME: ptr noundef nonnull align 4 dereferenceable(1) [[THIS:%.*]]) 
unnamed_addr #[[ATTR0:[0-9]+]] align 2 {
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    tail call void @_Z4initPvU25pass_dynamic_object_size0(ptr 
noundef nonnull align 4 dereferenceable(1) [[THIS]], i64 noundef -1) 
#[[ATTR2:[0-9]+]]
----------------
Sirraide wrote:

Essentially, what I meant was that there is no reason to ever write a codegen 
test w/ optimisation enabled—unless the code that you’re introducing has 
different behaviour depending on optimisation levels (which iirc isn’t the case 
for `__builtin_counted_by_ref`, right?).

*Other* tests might still require the `-O2`; and if that is the case, then we 
generally shouldn’t add tests for something that is invariant under 
optimisation (wrt how the frontend behaves; the IR would be different of 
course, but then has nothing to do w/ what Clang emits) to a file that contains 
tests that *do* care about optimisation levels. I thought at first that this is 
what you did here, but looking at it again, that doesn’t seem to be the case 
because there *is* in fact a separate file w/ tests for this pr.

So yeah, my bad if I wasn’t too clear about this ealier.

https://github.com/llvm/llvm-project/pull/114495
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to