Re: [PATCH 12/13] simplify TRUNC(SETCC(x,y), N)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/08/18 21:35, Luc Van Oostenryck wrote:
> Since the OP_SETCC instructions can only return a 0 or a 1,
> a truncation won't change the value and the OP_SETCC
> can be changed to directly return the extended size.
> 
> Remove the unneeded truncate.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  simplify.c                      | 1 +
>  validation/optim/setne0-trunc.c | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/simplify.c b/simplify.c
> index 728647a3e..45e03de19 100644
> --- a/simplify.c
> +++ b/simplify.c
> @@ -1196,6 +1196,7 @@ static int simplify_cast(struct instruction *insn)
>  				break;
>  			/* fall through */
>  		case OP_ZEXT:
> +		case OP_TRUNC:
>  			// simplify:
>  			//	setcc.n	%t <- %a, %b
>  			//	zext.m	%r <- (n) %t

Hmm, just reading the patch text, but don't you need to update
the comment (to include trunc)?

ATB,
Ramsay Jones

> diff --git a/validation/optim/setne0-trunc.c b/validation/optim/setne0-trunc.c
> index 621314100..6c5494eca 100644
> --- a/validation/optim/setne0-trunc.c
> +++ b/validation/optim/setne0-trunc.c
> @@ -3,7 +3,6 @@ char foo(int a) { return a != 0; }
>  /*
>   * check-name: setne0-trunc
>   * check-command: test-linearize -m64 -Wno-decl $file
> - * check-known-to-fail
>   *
>   * check-output-ignore
>   * check-output-excludes: trunc\\.
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux