foldFunctionStructArgConstOffset is called before the lowerFunctionArguments. If foldFunctionStructArgConstOffset is wrong, the INDIRECT_MOV generated in lowerFunctionArguments also wrong.
I afraid the following ir: BB2: LOADI %30, 4 Add %20, %10, %30 //%10 is a struct argument MOV %22, %20 //phi-mov BB3: LOADI %31, 8 Add %21, %11, %31 //%11 is another struct argument MOV %22, %21 //phi-mov BB4: LOADI %32, 4 Add %33, %22, %32 Will be converted to: LOADI %42, 8 Add %33, %10, %42 If so, the lowerFunctionArguments will wrong. > -----Original Message----- > From: Guo, Yejun > Sent: Tuesday, June 13, 2017 16:39 > To: Yang, Rong R <rong.r.y...@intel.com>; Wang, Rander > <rander.w...@intel.com>; Pan, Xiuli <xiuli....@intel.com>; > beignet@lists.freedesktop.org > Subject: RE: [Beignet] [PATCH] do constant folding for kernel struct args > > I just tried such kernel, and the generated GEN IR is INDIRECT_MOV, it has > nothing to do with this patch. > > Thanks > Yejun > > -----Original Message----- _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/beignet