Fixes for the tagging of discontinuous loops

The first fix was for all loops being considered discontinuous in
OutputHLSL because of a typo that produced a tautology.

The error was not detected by the unit tests because as an optimization we
do not generate Lod0 calls when they are not needed for the callee
function (which was correctly detected by the analysis in this case).
Fixed the unit tests by adding a call to a builtin gradient operation.

The second fix was for discard not being taken into account in the
analyses of the AST, which caused a WebGL test regression after the first
fix for conformance/glsl/bugs/conditional-discard-in-loop

BUG=angleproject:982

Change-Id: I1315eac1ad36f726be52d7fda5facf3104341b1f
Reviewed-on: https://chromium-review.googlesource.com/267814
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index db51120..b9ba0c2 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -2415,7 +2415,7 @@
 
     bool wasDiscontinuous = mInsideDiscontinuousLoop;
     mInsideDiscontinuousLoop = mInsideDiscontinuousLoop ||
-    mCurrentFunctionMetadata->mDiscontinuousLoops.count(node) >= 0;
+    mCurrentFunctionMetadata->mDiscontinuousLoops.count(node) > 0;
 
     if (mOutputType == SH_HLSL9_OUTPUT)
     {