GLSL shader compiler bug with FXAA, regression in driver 334.67, isolated to Kepler GPUs only

There seems to be a GLSL shader compiler bug that was introduced with the 334.67 beta driver and still remains in 334.89. I have been able to reproduce the problem on both a GTX 770 and a GTX 780, but not on my laptop’s GTX 460M. The problem causes FXAA 3.11 to not work correctly.

FXAA Off: http://i.imgur.com/FkfrazB.jpg
FXAA On: http://i.imgur.com/TMmvE8T.jpg
FXAA On with gather4 enabled: http://i.imgur.com/aLQk8gD.jpg

With FXAA enabled and gather4 disabled, FXAA is not working correctly and fails to handle lines that are almost vertical or horizontal. Enabling gather4 solves the problem, but gather4 is only supposed to be an optimization that does the exact same thing.

Here’s the shader I am using: http://pastebin.com/Preu7Y3c. This version has gather4 enabled if supported. Please change “#define FXAA_GATHER4_ALPHA 1” to “#define FXAA_GATHER4_ALPHA 0” to reproduce the problem.

I have only modified the top part and added the main() method at the bottom. All input value are correct. No changes have been made in the internals of the FXAA 3.11 shader. All input values were correct during testing.