Add tests for a corner case of when to relax all instructions:

We don't want to relax all instructions in

$ clang -c test.s

since most users don't pass -O when using the driver to assemble.

On the other hand, -save-temps should not change the output unnecessary, so in

$ clang -c test.c -save-temps

we should relax all instructions.

llvm-svn: 169815
This commit is contained in:
Rafael Espindola 2012-12-11 05:52:24 +00:00
parent 92e71918b1
commit c720d46ed7
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,4 @@
// RUN: %clang -### -c -save-temps -integrated-as %s 2>&1 | FileCheck %s
// CHECK: cc1as
// CHECK: -relax-all

View File

@ -0,0 +1,4 @@
// RUN: %clang -### -c -integrated-as %s 2>&1 | FileCheck %s
// CHECK: cc1as
// CHECK-NOT: -relax-all