<div dir="ltr">MipsFastISel::fastLowerArguments looks very broken and is likely the culprit here:<div><br></div><div><div>  const ArrayRef<MCPhysReg> GPR32ArgRegs = {Mips::A0, Mips::A1, Mips::A2,</div><div>                                            Mips::A3};</div><div>  const ArrayRef<MCPhysReg> FGR32ArgRegs = {Mips::F12, Mips::F14};</div><div>  const ArrayRef<MCPhysReg> AFGR64ArgRegs = {Mips::D6, Mips::D7};</div></div><div><br></div><div>These are dangling ArrayRefs referring to already-destroyed temporaries.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 April 2018 at 14:40, Galina Kistanova via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Manoj,<br><br>Looks like this commit broke tests at couple of our builders:<br>r329300<br><a href="http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9600" target="_blank">http://lab.llvm.org:8011/<wbr>builders/clang-with-thin-lto-<wbr>ubuntu/builds/9600</a><br><br>Few tests failed:<br>. . . <br>Failing Tests (7):<br>    LLVM :: CodeGen/Mips/Fast-ISel/<wbr>fastalloca.ll<br>    LLVM :: CodeGen/Mips/Fast-ISel/fastcc-<wbr>miss.ll<br>    LLVM :: CodeGen/Mips/Fast-ISel/<wbr>memtest1.ll<br>    LLVM :: CodeGen/Mips/Fast-ISel/mul1.ll<br>    LLVM :: CodeGen/Mips/Fast-ISel/sel1.ll<br>    LLVM :: CodeGen/Mips/call-<wbr>optimization.ll<br>    LLVM :: DebugInfo/Mips/delay-slot.ll<br><br>Previous revision:<br><a href="http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9602" target="_blank">http://lab.llvm.org:8011/<wbr>builders/clang-with-thin-lto-<wbr>ubuntu/builds/9602</a><br><br>Also another builder is affected:<br><a href="http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu" target="_blank">http://lab.llvm.org:8011/<wbr>builders/clang-with-lto-ubuntu</a><br><br>Both builders were red and did not send notifications.<br><br>Please have a look?<br><br>Thanks<br><br>Galina<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 8:29 AM, Manoj Gupta via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: manojgupta<br>
Date: Thu Apr  5 08:29:52 2018<br>
New Revision: 329300<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=329300&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=329300&view=rev</a><br>
Log:<br>
Disable -fmerge-all-constants as default.<br>
<br>
Summary:<br>
"-fmerge-all-constants" is a non-conforming optimization and should not<br>
be the default. It is also causing miscompiles when building Linux<br>
Kernel (<a href="https://lkml.org/lkml/2018/3/20/872" rel="noreferrer" target="_blank">https://lkml.org/lkml/2018/3/<wbr>20/872</a>).<br>
<br>
Fixes PR18538.<br>
<br>
Reviewers: rjmccall, rsmith, chandlerc<br>
<br>
Reviewed By: rsmith, chandlerc<br>
<br>
Subscribers: srhines, cfe-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D45289" rel="noreferrer" target="_blank">https://reviews.llvm.org/D4528<wbr>9</a><br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Driver<wbr>/Options.td<br>
    cfe/trunk/lib/AST/ExprConstant<wbr>.cpp<br>
    cfe/trunk/lib/Driver/ToolChain<wbr>s/Clang.cpp<br>
    cfe/trunk/lib/Frontend/Compile<wbr>rInvocation.cpp<br>
    cfe/trunk/test/CodeGen/array-i<wbr>nit.c<br>
    cfe/trunk/test/CodeGen/decl.c<br>
    cfe/trunk/test/CodeGenCXX/cons<wbr>t-init-cxx11.cpp<br>
    cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-references.cpp<br>
    cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-stdinitializerli<wbr>st.cpp<br>
    cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-cxx11-init-list.mm" rel="noreferrer" target="_blank">a<wbr>rc-cxx11-init-list.mm</a><br>
    cfe/trunk/test/Driver/clang_f_<wbr>opts.c<br>
<br>
Modified: cfe/trunk/include/clang/Driver<wbr>/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/include/clang/<wbr>Driver/Options.td?rev=329300&<wbr>r1=329299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/Driver<wbr>/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver<wbr>/Options.td Thu Apr  5 08:29:52 2018<br>
@@ -1133,7 +1133,8 @@ def fthinlto_index_EQ : Joined<["-"], "f<br>
   HelpText<"Perform ThinLTO importing using provided function summary index">;<br>
 def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,<br>
                                 Group<f_Group>, Flags<[DriverOption, CoreOption]>;<br>
-def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>;<br>
+def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>,<br>
+  Flags<[CC1Option]>, HelpText<"Allow merging of constants">;<br>
 def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;<br>
 def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,<br>
   HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;<br>
@@ -1282,7 +1283,7 @@ def fveclib : Joined<["-"], "fveclib=">,<br>
 def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,<br>
   HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;<br>
 def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,<br>
-    Flags<[CC1Option]>, HelpText<"Disallow merging of constants">;<br>
+  HelpText<"Disallow merging of constants">;<br>
 def fno_modules : Flag <["-"], "fno-modules">, Group<f_Group>,<br>
   Flags<[DriverOption]>;<br>
 def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>,<br>
<br>
Modified: cfe/trunk/lib/AST/ExprConstant<wbr>.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/AST/ExprCo<wbr>nstant.cpp?rev=329300&r1=<wbr>329299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/AST/ExprConstant<wbr>.cpp (original)<br>
+++ cfe/trunk/lib/AST/ExprConstant<wbr>.cpp Thu Apr  5 08:29:52 2018<br>
@@ -8596,9 +8596,6 @@ bool IntExprEvaluator::VisitBinaryO<wbr>perat<br>
             (LHSValue.Base && isZeroSized(RHSValue)))<br>
           return Error(E);<br>
         // Pointers with different bases cannot represent the same object.<br>
-        // (Note that clang defaults to -fmerge-all-constants, which can<br>
-        // lead to inconsistent results for comparisons involving the address<br>
-        // of a constant; this generally doesn't matter in practice.)<br>
         return Success(E->getOpcode() == BO_NE, E);<br>
       }<br>
<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChain<wbr>s/Clang.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Driver/Too<wbr>lChains/Clang.cpp?rev=329300&<wbr>r1=329299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/ToolChain<wbr>s/Clang.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChain<wbr>s/Clang.cpp Thu Apr  5 08:29:52 2018<br>
@@ -3361,9 +3361,9 @@ void Clang::ConstructJob(Compilatio<wbr>n &C,<br>
<br>
   Args.AddLastArg(CmdArgs, options::OPT_fveclib);<br>
<br>
-  if (!Args.hasFlag(options::OPT_fm<wbr>erge_all_constants,<br>
-                    options::OPT_fno_merge_all_con<wbr>stants))<br>
-    CmdArgs.push_back("-fno-merge-<wbr>all-constants");<br>
+  if (Args.hasFlag(options::OPT_fme<wbr>rge_all_constants,<br>
+                   options::OPT_fno_merge_all_co<wbr>nstants, false))<br>
+    CmdArgs.push_back("-fmerge-all<wbr>-constants");<br>
<br>
   // LLVM Code Generator Options.<br>
<br>
<br>
Modified: cfe/trunk/lib/Frontend/Compile<wbr>rInvocation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Frontend/<wbr>CompilerInvocation.cpp?rev=<wbr>329300&r1=329299&r2=329300&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Frontend/Compile<wbr>rInvocation.cpp (original)<br>
+++ cfe/trunk/lib/Frontend/Compile<wbr>rInvocation.cpp Thu Apr  5 08:29:52 2018<br>
@@ -605,7 +605,7 @@ static bool ParseCodeGenArgs(CodeGenOpti<br>
       Args.hasFlag(OPT_ffine_graine<wbr>d_bitfield_accesses,<br>
                    OPT_fno_fine_grained_bitfield_<wbr>accesses, false);<br>
   Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf<wbr>_debug_flags);<br>
-  Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all<wbr>_constants);<br>
+  Opts.MergeAllConstants = Args.hasArg(OPT_fmerge_all_con<wbr>stants);<br>
   Opts.NoCommon = Args.hasArg(OPT_fno_common);<br>
   Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_fl<wbr>oat);<br>
   Opts.OptimizeSize = getOptimizationLevelSize(Args)<wbr>;<br>
<br>
Modified: cfe/trunk/test/CodeGen/array-i<wbr>nit.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/array-init.c?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGen/<wbr>array-init.c?rev=329300&r1=<wbr>329299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGen/array-i<wbr>nit.c (original)<br>
+++ cfe/trunk/test/CodeGen/array-i<wbr>nit.c Thu Apr  5 08:29:52 2018<br>
@@ -1,8 +1,11 @@<br>
-// RUN: %clang_cc1 %s -O0 -triple x86_64-unknown-linux-gnu -emit-llvm -o - | FileCheck %s<br>
+// RUN: %clang_cc1 %s -O0 -triple x86_64-unknown-linux-gnu -emit-llvm -o - | FileCheck -check-prefix=CHECK-NO-MERGE-C<wbr>ONSTANTS %s<br>
+// RUN: %clang_cc1 %s -O0 -triple x86_64-unknown-linux-gnu -fmerge-all-constants -emit-llvm -o - | FileCheck -check-prefix=CHECK-MERGE-CONS<wbr>TANTS %s<br>
<br>
-// CHECK: @{{.*}}.a1 = internal constant [5 x i32] [i32 0, i32 1, i32 2, i32 0, i32 0]<br>
-// CHECK: @{{.*}}.a2 = internal constant [5 x i32] zeroinitializer<br>
-// CHECK: @{{.*}}.a3 = internal constant [5 x i32] zeroinitializer<br>
+// CHECK-NO-MERGE-CONSTANTS: @{{.*}}.a1 = private unnamed_addr constant [5 x i32] [i32 0, i32 1, i32 2, i32 0, i32 0]<br>
+<br>
+// CHECK-MERGE-CONSTANTS: @{{.*}}.a1 = internal constant [5 x i32] [i32 0, i32 1, i32 2, i32 0, i32 0]<br>
+// CHECK-MERGE-CONSTANTS: @{{.*}}.a2 = internal constant [5 x i32] zeroinitializer<br>
+// CHECK-MERGE-CONSTANTS: @{{.*}}.a3 = internal constant [5 x i32] zeroinitializer<br>
<br>
 void testConstArrayInits(void)<br>
 {<br>
<br>
Modified: cfe/trunk/test/CodeGen/decl.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/decl.c?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGen/<wbr>decl.c?rev=329300&r1=329299&<wbr>r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGen/decl.c (original)<br>
+++ cfe/trunk/test/CodeGen/decl.c Thu Apr  5 08:29:52 2018<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -w -emit-llvm < %s | FileCheck %s<br>
+// RUN: %clang_cc1 -w -fmerge-all-constants -emit-llvm < %s | FileCheck %s<br>
<br>
 // CHECK: @test1.x = internal constant [12 x i32] [i32 1<br>
 // CHECK: @test2.x = private unnamed_addr constant [13 x i32] [i32 1,<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/cons<wbr>t-init-cxx11.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/const-init-cxx11.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGenCX<wbr>X/const-init-cxx11.cpp?rev=<wbr>329300&r1=329299&r2=329300&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGenCXX/cons<wbr>t-init-cxx11.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/cons<wbr>t-init-cxx11.cpp Thu Apr  5 08:29:52 2018<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -w -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 | FileCheck %s<br>
+// RUN: %clang_cc1 -w -fmerge-all-constants -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 | FileCheck %s<br>
<br>
 // FIXME: The padding in all these objects should be zero-initialized.<br>
 namespace StructUnion {<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-references.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-references.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGenCX<wbr>X/cxx0x-initializer-references<wbr>.cpp?rev=329300&r1=329299&r2=<wbr>329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-references.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-references.cpp Thu Apr  5 08:29:52 2018<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s<br>
+// RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -fmerge-all-constants -emit-llvm -o - %s | FileCheck %s<br>
<br>
 namespace reference {<br>
   struct A {<br>
<br>
Modified: cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-stdinitializerli<wbr>st.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGenCX<wbr>X/cxx0x-initializer-stdinitial<wbr>izerlist.cpp?rev=329300&r1=<wbr>329299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-stdinitializerli<wbr>st.cpp (original)<br>
+++ cfe/trunk/test/CodeGenCXX/cxx0<wbr>x-initializer-stdinitializerli<wbr>st.cpp Thu Apr  5 08:29:52 2018<br>
@@ -1,5 +1,5 @@<br>
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefixes=X86,CHECK %s<br>
-// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa -DNO_TLS -emit-llvm -o - %s | FileCheck -check-prefixes=AMDGCN,CHECK %s<br>
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=X86,CHECK %s<br>
+// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa -DNO_TLS -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=AMDGCN,CHECK %s<br>
<br>
 namespace std {<br>
   typedef decltype(sizeof(int)) size_t;<br>
<br>
Modified: cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-cxx11-init-list.mm" rel="noreferrer" target="_blank">a<wbr>rc-cxx11-init-list.mm</a><br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-cxx11-init-list.mm?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/CodeGenOb<wbr>jCXX/arc-cxx11-init-list.mm?<wbr>rev=329300&r1=329299&r2=<wbr>329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-cxx11-init-list.mm" rel="noreferrer" target="_blank">a<wbr>rc-cxx11-init-list.mm</a> (original)<br>
+++ cfe/trunk/test/CodeGenObjCXX/<a href="http://arc-cxx11-init-list.mm" rel="noreferrer" target="_blank">a<wbr>rc-cxx11-init-list.mm</a> Thu Apr  5 08:29:52 2018<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang_cc1 -triple armv7-ios5.0 -std=c++11 -fobjc-arc -Os -emit-llvm -o - %s | FileCheck %s<br>
+// RUN: %clang_cc1 -triple armv7-ios5.0 -std=c++11 -fmerge-all-constants -fobjc-arc -Os -emit-llvm -o - %s | FileCheck %s<br>
<br>
 // CHECK: @[[STR0:.*]] = private unnamed_addr constant [5 x i8] c"str0\00", section "__TEXT,__cstring,cstring_lite<wbr>rals"<br>
 // CHECK: @[[UNNAMED_CFSTRING0:.*]] = private global %struct.__NSConstantString_tag { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassRefere<wbr>nce, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @[[STR0]], i32 0, i32 0), i32 4 }, section "__DATA,__cfstring"<br>
<br>
Modified: cfe/trunk/test/Driver/clang_f_<wbr>opts.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=329300&r1=329299&r2=329300&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/Driver/cl<wbr>ang_f_opts.c?rev=329300&r1=329<wbr>299&r2=329300&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/Driver/clang_f_<wbr>opts.c (original)<br>
+++ cfe/trunk/test/Driver/clang_f_<wbr>opts.c Thu Apr  5 08:29:52 2018<br>
@@ -276,6 +276,7 @@<br>
 // RUN:     -fno-inline-small-functions -finline-small-functions              \<br>
 // RUN:     -fno-fat-lto-objects -ffat-lto-objects                            \<br>
 // RUN:     -fno-merge-constants -fmerge-constants                            \<br>
+// RUN:     -fno-merge-all-constants -fmerge-all-constants                    \<br>
 // RUN:     -fno-caller-saves -fcaller-saves                                  \<br>
 // RUN:     -fno-reorder-blocks -freorder-blocks                              \<br>
 // RUN:     -fno-schedule-insns2 -fschedule-insns2                            \<br>
@@ -522,3 +523,10 @@<br>
 // RUN: %clang -### -S -fno-discard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-NO-DISCARD<wbr>-NAMES %s<br>
 // CHECK-DISCARD-NAMES: "-discard-value-names"<br>
 // CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names"<br>
+//<br>
+// RUN: %clang -### -S -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-<wbr>CONSTANTS %s<br>
+// RUN: %clang -### -S -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-A<wbr>LL-CONSTANTS %s<br>
+// RUN: %clang -### -S -fmerge-all-constants -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-A<wbr>LL-CONSTANTS %s<br>
+// RUN: %clang -### -S -fno-merge-all-constants -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-<wbr>CONSTANTS %s<br>
+// CHECK-NO-MERGE-ALL-CONSTANTS-N<wbr>OT: "-fmerge-all-constants"<br>
+// CHECK-MERGE-ALL-CONSTANTS: "-fmerge-all-constants"<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>