[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 25 14:45:45 PDT 2024
================
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s -O2 | FileCheck %s
-// Make sure the call to b() doesn't get optimized out.
+// Make sure the call to b() is eliminated.
extern struct x {char& x,y;}y;
int b();
int a() { if (!&y.x) b(); }
----------------
efriedma-quic wrote:
Looking at the original commit, maybe change this to `char *a() { return &y.x; }`. Or just delete the test, since we have plenty of other test coverage for references.
https://github.com/llvm/llvm-project/pull/98746
More information about the cfe-commits
mailing list