https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119114
--- Comment #12 from Li Pan <pan2.li at intel dot com> --- (In reply to Robin Dapp from comment #9) > I suspect the problem lies somewhere here: > > _11 = .VEC_EXTRACT (mask__83.22_110, 0); > _23 = MEM[(short int *)&t + 20B]; > _24 = _23 & _132; > _25 = _24 != 0; > _121 = (<signed-boolean:1>) _25; > _157 = _11 ^ _121; > > For > _121 = (<signed-boolean:1>) _25; Would like to double-check the semantics for the below stmts from the gimple perspective. _Bool _25; short int _24; // 3 _23 = MEM[(short int *)&t + 20B]; // 3 _24 = _23 & D__lsm0.65_262; // 3 _25 = _24 != 0; // 1 _127 = (<signed-boolean:1>) _25; // 1 _157 = _127 ^ _278; // 1 I am not very sure my understanding about _127 = (<signed-boolean:1>) _25 is correct. When _24 is 3, _25 is 1, and _127 should be 1 ? Just like cast to 1 bit. > we seem to be negating a 1 to a -1. Once the -1 is xor'ed with 1 the result > is -2 instead of the expected 0. It's not the negation itself but rather > the whole sequence leading to it. Yes, I checked the asm runtime value, we have -2 after xor. and.....a4,a4,a2 // a2 = 3, a4 = 3 snez....a4,a4 // a4 = 1 neg.....a4,a4 // a4 = -1 xor.....a4,a4,a3 // a4 = -2, a3 = 1