OSDN Git Service

radeonsi: Set datalayout on the llvm module
authorTom Stellard <thomas.stellard@amd.com>
Thu, 15 Dec 2016 15:25:49 +0000 (15:25 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 31 Jan 2017 20:39:30 +0000 (20:39 +0000)
commite0cc0a614c96011958bc3a1b84da9168e0e1ccbb
tree3d0320f93e7918ed276a8ac1106e3f435fff12a2
parent11e9ebbf15ecf49d7ef02c2ec6c2d9d3ff0f1b6e
radeonsi: Set datalayout on the llvm module

This prevents LLVM from using sext instructions for local memory offsets
and allows the backend to fold immediate offsets into the instruction.

This also prevents some incorrect code generation for ptrtoint and
inttoptr instructions.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c