From: Olivier Sallenave Date: Thu, 9 Apr 2015 17:38:50 +0000 (+0000) Subject: Added flag to disable isel instruction on PPC target. Using regular branches instead... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2273bdf2adc3448fdce5b9fb9b921560aa404b16;p=clang Added flag to disable isel instruction on PPC target. Using regular branches instead of isel is more efficient in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234509 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 45729cf0ab..ee5018615c 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1274,6 +1274,8 @@ def mfprnd : Flag<["-"], "mfprnd">, Group; def mno_fprnd : Flag<["-"], "mno-fprnd">, Group; def mcmpb : Flag<["-"], "mcmpb">, Group; def mno_cmpb : Flag<["-"], "mno-cmpb">, Group; +def misel : Flag<["-"], "misel">, Group; +def mno_isel : Flag<["-"], "mno-isel">, Group; def mmfcrf : Flag<["-"], "mmfcrf">, Group; def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Group; def mpopcntd : Flag<["-"], "mpopcntd">, Group; diff --git a/test/Driver/ppc-features.cpp b/test/Driver/ppc-features.cpp index 39d6357dcc..8ef8318469 100644 --- a/test/Driver/ppc-features.cpp +++ b/test/Driver/ppc-features.cpp @@ -77,6 +77,12 @@ // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-mfcrf -mmfcrf -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-MFCRF %s // CHECK-MFCRF: "-target-feature" "+mfocrf" +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-isel -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOISEL %s +// CHECK-NOISEL: "-target-feature" "-isel" + +// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-isel -misel -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-ISEL %s +// CHECK-ISEL: "-target-feature" "+isel" + // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-popcntd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOPOPCNTD %s // CHECK-NOPOPCNTD: "-target-feature" "-popcntd"