It will synthesize to the same logic, but it can be different for simulation with 'X', 'Z' etc.
For vectors with the length specified with a generic, a constant should be used instead of the "1111" vectors:
Code:
constant c_all_ones : std_logic_vector(same range as x and y) := (others => '1');
if x /= c_all_ones and y /= c_all_ones then