[PATCH] D95822: [FE] Manipulate the first byte of guard variable type in both load and store operation

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 12:22:03 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: clang/test/CodeGenCXX/global-init.cpp:84
   // CHECK-NEXT: store i32 [[CALL]], i32* @_ZN5test41xE
-  // CHECK-NEXT: store i64 1, i64* @_ZGVN5test41xE
+  // CHECK-NEXT: store i8 1, i8* bitcast (i64* @_ZGVN5test41xE to i8*)
   __attribute__((weak)) int x = foo();
----------------
Xiangling_L wrote:
> abhina.sreeskantharajan wrote:
> > nit: the lines above omit the end of the line. It's probably better to be consistent
> > 
> > 
> It didn't omit the end of the line. It is because before my patch, there was no casting.
Hi @Xiangling_L, I think Abhina meant the lines above in this file. The `load` has a `bitcast` too (and stops after the guard variable name).


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

https://reviews.llvm.org/D95822



More information about the cfe-commits mailing list