Re: [PATCH] builtins: Fix fold_builtin_query clzg/ctzg side-effects handling [PR112639]

2023-11-21 Thread Richard Biener
On Tue, 21 Nov 2023, Jakub Jelinek wrote: > Hi! > > As the testcase shows, I've missed one spot where initially the code thinks > it could use 2 argument IFN_CLZ/IFN_CTZ form, but then verifies it can't > because it doesn't have the right target value and turns it into the > arg0 ? arg1 :

[PATCH] builtins: Fix fold_builtin_query clzg/ctzg side-effects handling [PR112639]

2023-11-21 Thread Jakub Jelinek
Hi! As the testcase shows, I've missed one spot where initially the code thinks it could use 2 argument IFN_CLZ/IFN_CTZ form, but then verifies it can't because it doesn't have the right target value and turns it into the arg0 ? arg1 : .C[LT]Z (arg0) form. That form evaluates the argument twice