jit: Correct parameter type for generated expression evaluation functions.

Andres Freund <andres@anarazel.de>

Commit: 1e16ad101459432418d61a0faf2c7692ad76459b
Author: Andres Freund <andres@anarazel.de>
Date: 2020-12-08T02:40:27Z
Releases: 11.11
jit: Correct parameter type for generated expression evaluation functions.

clang only uses the 'i1' type for scalar booleans, not for pointers to
booleans (as the pointer might be pointing into a larger memory
allocation). Therefore a pointer-to-bool needs to the "storage" boolean.

There's no known case of wrong code generation due to this, but it seems quite
possible that it could cause problems (see e.g. 72559438f92).

Author: Andres Freund
Discussion: https://postgr.es/m/20201207212142.wz5tnbk2jsaqzogb@alap3.anarazel.de
Backpatch: 11-, where jit support was added

Files

PathChange+/−
src/backend/jit/llvm/llvmjit_expr.c modified +1 −3

Discussion