[PATCH] D71774: [RISCV] Optimize seteq/setne pattern expansions for better code size
weiwei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 09:19:57 PST 2019
wwei added a comment.
The case was from dhrystone(dhry_2.c):
Boolean Func_3 (Enum_Par_Val)
/***************************/
/* executed once */
/* Enum_Par_Val == Ident_3 */
Enumeration Enum_Par_Val;
{
Enumeration Enum_Loc;
Enum_Loc = Enum_Par_Val;
if (Enum_Loc == Ident_3)
/* then, executed */
return (true);
else /* not executed */
return (false);
} /* Func_3 */
I found gcc will have better code size (c.addi + sqez) than llvm (xori + sqez), so this patch try to implement the same optimization.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71774/new/
https://reviews.llvm.org/D71774
More information about the llvm-commits
mailing list