Re: [Mesa-dev] [PATCH] Revert "nir/builder: Assert that intN_t immediates fit"

2018-11-20 Thread Jason Ekstrand
Yeah, I think this is fine. We could expand the assert further to cover all possible casting cases but it's probably not worth it. Reviewed-by: Jason Ekstrand --Jason On Tue, Nov 20, 2018 at 4:14 AM Juan A. Suarez Romero wrote: > On Tue, 2018-11-20 at 09:47 +0100, Iago Toral Quiroga wrote:

Re: [Mesa-dev] [PATCH] Revert "nir/builder: Assert that intN_t immediates fit"

2018-11-20 Thread Mark Janes
"Juan A. Suarez Romero" writes: > On Tue, 2018-11-20 at 11:13 +0100, Juan A. Suarez Romero wrote: >> On Tue, 2018-11-20 at 09:47 +0100, Iago Toral Quiroga wrote: >> > This reverts commit . >> > >> > For this to work the compiler must ensure that it never puts >> > the values that arrive to this

Re: [Mesa-dev] [PATCH] Revert "nir/builder: Assert that intN_t immediates fit"

2018-11-20 Thread Juan A. Suarez Romero
On Tue, 2018-11-20 at 11:13 +0100, Juan A. Suarez Romero wrote: > On Tue, 2018-11-20 at 09:47 +0100, Iago Toral Quiroga wrote: > > This reverts commit . > > > > For this to work the compiler must ensure that it never puts > > the values that arrive to this helper into unsigned variables > > at

Re: [Mesa-dev] [PATCH] Revert "nir/builder: Assert that intN_t immediates fit"

2018-11-20 Thread Juan A. Suarez Romero
On Tue, 2018-11-20 at 09:47 +0100, Iago Toral Quiroga wrote: > This reverts commit . > > For this to work the compiler must ensure that it never puts > the values that arrive to this helper into unsigned variables > at any point in its processing, since that would not apply sign > extension to

[Mesa-dev] [PATCH] Revert "nir/builder: Assert that intN_t immediates fit"

2018-11-20 Thread Iago Toral Quiroga
This reverts commit 1f29f4db1e867357a119c0c7c34fb54dc27fb682. For this to work the compiler must ensure that it never puts the values that arrive to this helper into unsigned variables at any point in its processing, since that would not apply sign extension to the value and it would break the