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

Xiangling Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 12:37:12 PST 2021


Xiangling_L 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();
----------------
hubert.reinterpretcast wrote:
> 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).
I see. Sorry for the misunderstanding. @abhina.sreeskantharajan 


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

https://reviews.llvm.org/D95822



More information about the cfe-commits mailing list