I mostly use Verilog, and I'm not familiar so much with VHDL. But if I understand the VHDL code correctly, then it certainly would help Quartus to reduce the logic.
Disregarding the HDL language, any selection logic can be optimized if you are certain that specific values would never happen at the selection input (or if you don't care about the output in that case).
--- Quote Start ---
if en = '1' then
q <= d;
elsif en = '0' then
null; --hold q
else --catch all for unitialised input enable
q <= 'X';
end if;
--- Quote End ---
Tricky, this is not the issue that the OP is raising. You are talking about what to do when the input is 'X' (which is obviously just a simulation concept). But he is talking about something else. He is talking about using 'X' as the
output in certain cases.
The idea is that you are telling Quartus that if the input has certain values, then you don't care about the output. This way, Quartus can optimize the selection logic.