aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-15 15:48:13 +0000
committerbergner <bergner@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-15 15:48:13 +0000
commit351dbdf71e40a8461429e903ae7c356c94402452 (patch)
tree8619ecb610c5623ea3e6c84907f8e80fe9a406a8
parent09f97086888850f60f3be0c1c4455eca83e0e1a0 (diff)
parent827d5bd28a65729646d71b709c7415db1592f24d (diff)
Merge up to 223200.
* REVISION: Update subversion id. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_8-branch@223219 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
-rw-r--r--gcc/ChangeLog199
-rw-r--r--gcc/ChangeLog.ibm5
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/REVISION2
-rw-r--r--gcc/config/aarch64/aarch64.md12
-rw-r--r--gcc/config/rs6000/altivec.md4
-rw-r--r--gcc/config/rs6000/crypto.md13
-rw-r--r--gcc/config/rs6000/htm.md285
-rw-r--r--gcc/config/rs6000/htmxlintrin.h3
-rw-r--r--gcc/config/rs6000/rs6000-builtin.def107
-rw-r--r--gcc/config/rs6000/rs6000.c302
-rw-r--r--gcc/config/rs6000/rs6000.h8
-rw-r--r--gcc/config/rs6000/rs6000.opt24
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/semantics.c5
-rw-r--r--gcc/doc/extend.texi17
-rw-r--r--gcc/fortran/ChangeLog12
-rw-r--r--gcc/fortran/decl.c3
-rw-r--r--gcc/fortran/gfortran.h1
-rw-r--r--gcc/fortran/symbol.c8
-rw-r--r--gcc/ipa-inline-analysis.c16
-rw-r--r--gcc/testsuite/ChangeLog169
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C4
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr63551.C23
-rw-r--r--gcc/testsuite/g++.dg/lookup/using55.C19
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr63551.c33
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr64041.c64
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-24.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-25.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-29.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr16105.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr20122.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr33804.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr33953.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-25.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-105-big-array.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-105.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-27.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-29.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-33.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-42.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-44.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-48.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-50.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-52.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-56.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-60.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-72.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-75-big-array.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-75.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-77-global.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-78-global.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-93.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-95.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-96.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cond-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cond-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cond-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cselim-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-3a.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-fir.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-peel-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-peel-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-pre-interact.c2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr64304.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c36
-rw-r--r--gcc/testsuite/gcc.target/powerpc/htm-1.c52
-rw-r--r--gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr65456.c65
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr65787.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c35
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c4
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_27.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr32380.f2
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-2.f908
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-3.f906
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-4.f904
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-5.f906
-rw-r--r--gcc/testsuite/lib/target-supports.exp29
113 files changed, 1375 insertions, 526 deletions
diff --git a/ChangeLog b/ChangeLog
index 21aed67a69c..da388733922 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-03 Matthias Klose <doko@ubuntu.com>
+
+ * configure.ac: Match $host configured with triplets.
+ * configure: Regenerate.
+
2014-12-19 Release Manager
* GCC 4.8.4 released.
diff --git a/configure b/configure
index ca2e0950303..80cf60626b9 100755
--- a/configure
+++ b/configure
@@ -3834,7 +3834,7 @@ fi
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
- alpha*-*-linux*)
+ alpha*-linux*)
host_makefile_frag="config/mh-alpha-linux"
;;
hppa*-hp-hpux10*)
diff --git a/configure.ac b/configure.ac
index 2000f33c9f8..90221a706ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1154,7 +1154,7 @@ case "${host}" in
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
- alpha*-*-linux*)
+ alpha*-linux*)
host_makefile_frag="config/mh-alpha-linux"
;;
hppa*-hp-hpux10*)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2c56a7048a6..314ea43e7c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,202 @@
+2015-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.opt (-mcompat-align-parm): Reset initial
+ value that was modified by accident in my last change.
+
+2015-05-05 Shanyao Chen <chenshanyao@huawei.com>
+
+ Backported from mainline
+ 2015-01-19 Jiong Wang <jiong.wang@arm.com>
+ Andrew Pinski <apinski@cavium.com>
+
+ PR target/64304
+ * config/aarch64/aarch64.md (define_insn "*ashl<mode>3_insn"): Deleted.
+ (ashl<mode>3): Don't expand if operands[2] is not constant.
+
+2015-05-05 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline.
+ 2015-04-27 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/64579
+ * config/rs6000/htm.md: Remove all define_expands.
+ (UNSPECV_HTM_TABORTDC, UNSPECV_HTM_TABORTDCI, UNSPECV_HTM_TABORTWC,
+ UNSPECV_HTM_TABORTWCI): Remove.
+ (UNSPECV_HTM_TABORTXC, UNSPECV_HTM_TABORTXCI, UNSPECV_HTM_TTEST): New.
+ (tabort_internal, tbegin_internal, tcheck_internal, tend_internal,
+ trechkpt_internal, treclaim_internal, tsr_internal): Rename from this...
+ (tabort, tbegin, tcheck, tend, trechkpt, treclaim, tsr): ...to this.
+ (tabortdc_internal, tabortdci_internal, tabortwc_internal,
+ tabortwci_internal): Remove define_insns.
+ (tabort<wd>c, tabort<wd>ci): New define_insns.
+ (tabort): Use gpc_reg_operand.
+ (tcheck): Remove operand.
+ (htm_mfspr_<mode>, htm_mtspr_<mode>): Use GPR mode macro.
+ * config/rs6000/htmxlintrin.h (__TM_end): Use _HTM_TRANSACTIONAL as
+ expected value.
+ * config/rs6000/rs6000-builtin.def (BU_HTM_SPR0): Remove.
+ (BU_HTM_SPR1): Rename to BU_HTM_V1. Remove use of RS6000_BTC_SPR.
+ (tabort, tabortdc, tabortdci, tabortwc, tabortwci, tbegin,
+ tcheck, tend, tendall, trechkpt, treclaim, tresume, tsuspend,
+ tsr, ttest): Pass in the RS6000_BTC_CR attribute.
+ (get_tfhar, set_tfhar, get_tfiar, set_tfiar, get_texasr, set_texasr,
+ get_texasru, set_texasru): Pass in the RS6000_BTC_SPR attribute.
+ (tcheck): Remove builtin argument.
+ * config/rs6000/rs6000.c (rs6000_htm_spr_icode): Use TARGET_POWERPC64
+ not TARGET_64BIT.
+ (htm_expand_builtin): Fix usage of expandedp. Disallow usage of the
+ tabortdc and tabortdci builtins when not in 64-bit mode.
+ Modify code to handle the loss of the HTM define_expands.
+ Emit code to copy the CR register to TARGET.
+ (htm_init_builtins): Modify code to handle the loss of the HTM
+ define_expands.
+ * config/rs6000/rs6000.h (RS6000_BTC_32BIT): Delete.
+ (RS6000_BTC_64BIT): Likewise.
+ (RS6000_BTC_CR): New macro.
+ * doc/extend.texi: Update documentation for htm builtins.
+
+2015-04-30 Marek Polacek <polacek@redhat.com>
+
+ Backported from mainline
+ 2014-12-03 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/64153
+ * ipa-inline-analysis.c (evaluate_conditions_for_known_args): Check
+ type sizes before view_converting.
+
+ 2014-12-01 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/63551
+ * ipa-inline-analysis.c (evaluate_conditions_for_known_args): Convert
+ value of the argument to the type of the value in the condition.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222385
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/altivec.md (*altivec_lvx_<mode>_internal): Remove
+ asterisk from name so this can be generated directly.
+ (*altivec_stvx_<mode>_internal): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Add assert
+ that this is never called during or after reload/lra.
+ (rs6000_frame_related): Remove split_reg
+ argument and logic that references it.
+ (emit_frame_save): Remove last parameter from call to
+ rs6000_frame_related.
+ (rs6000_emit_prologue): Remove last parameter from eight calls to
+ rs6000_frame_related. Force generation of stvx instruction for
+ Altivec register saves. Remove split_reg handling, which is no
+ longer needed.
+ (rs6000_emit_epilogue): Force generation of lvx instruction for
+ Altivec register restores.
+
+2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Backport from mainline
+ 2015-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/65849
+ * config/rs6000/rs6000.opt (-mvsx-align-128): Make options that
+ save to independent variables use the Save attribute. This will
+ allow these options to be modified with the #pragma/attribute
+ target support.
+ (-mallow-movmisalign): Likewise.
+ (-mallow-df-permute): Likewise.
+ (-msched-groups): Likewise.
+ (-malways-hint): Likewise.
+ (-malign-branch-targets): Likewise.
+ (-mvectorize-builtins): Likewise.
+ (-msave-toc-indirect): Likewise.
+
+ * config/rs6000/rs6000.c (rs6000_opt_masks): Add more options that
+ can be set via the #pragma/attribute target support.
+ (rs6000_opt_vars): Likewise.
+ (rs6000_inner_target_options): If VSX was set, also set
+ -mno-avoid-indexed-addresses.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/crypto.md (crypto_vpmsum<CR_char>): Change
+ TARGET_CRYPTO to TARGET_P8_VECTOR>
+ (crypto_vpermxor_<mode>): Likewise.
+ * config/rs6000/rs6000-builtin.def (BU_CRYPTO_2A): New #define.
+ (BU_CRYPTO_3A): Likewise.
+ (BU_CRYPTO_OVERLOAD_2A): Rename from BU_CRYPTO_OVERLOAD_2.
+ (BU_CRYPTO_OVERLOAD_3A): New #define.
+ (VPMSUMB): Change from BU_CRYPTO_2 to BU_CRYPTO_2A.
+ (VPMSUMH): Likewise.
+ (VPMSUMW): Likewise.
+ (VPMSUMD): Likewise.
+ (VPERMXOR_V2DI): Change from BU_CRYPTO_3 to BU_CRYPTO_3A.
+ (VPERMXOR_V4SI): Likewise.
+ (VPERMXOR_V8HI): Likewise.
+ (VPERMXOR_V16QI): Likewise.
+ (VPMSUM): Change from BU_CRYPTO_OVERLOAD_2 to
+ BU_CRYPTO_OVERLOAD_2A.
+ (VPERMXOR): Change from BU_CRYPTO_OVERLOAD3 to
+ BU_CRYPTO_OVERLOAD_3A.
+ * config/rs6000/rs6000.opt (mcrypto): Change description of
+ option.
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.opt (mcrypto): Change option description to
+ match category changes in ISA 2.07B.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222351
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * config/rs6000/rs6000.c (rtx_is_swappable_p): Commentary
+ adjustments.
+ (insn_is_swappable_p): Return 1 for a convert from double to
+ single precision when all of its uses are splats of BE element
+ zero.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222349
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65456
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): For
+ VSX + POWER8, enable TARGET_ALLOW_MOVMISALIGN and
+ TARGET_EFFICIENT_UNALIGNED_VSX if not selected by command line
+ option.
+ (rs6000_builtin_mask_for_load): Return 0 for targets with
+ efficient unaligned VSX accesses so that the vectorizer will use
+ direct unaligned loads.
+ (rs6000_builtin_support_vector_misalignment): Always return true
+ for targets with efficient unaligned VSX accesses.
+ (rs6000_builtin_vectorization_cost): Cost of unaligned loads and
+ stores on targets with efficient unaligned VSX accesses is almost
+ always the same as the cost of an aligned load or store, so model
+ it that way.
+ * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Return 0 for
+ unaligned vectors if we have efficient unaligned VSX accesses.
+ * config/rs6000/rs6000.opt (mefficient-unaligned-vector): New
+ undocumented option.
+
+2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ Backport from mainline r222205
+ 2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65787
+ * config/rs6000/rs6000.c (rtx_is_swappable_p): Ensure that a
+ subsequent SH_NONE operand does not overwrite an existing *special
+ value.
+ (adjust_extract): Handle case where a vec_extract operation is
+ wrapped in a PARALLEL.
+
2015-04-02 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (pa_output_move_double): Directly handle register
diff --git a/gcc/ChangeLog.ibm b/gcc/ChangeLog.ibm
index acc0c79f57b..391abe126ab 100644
--- a/gcc/ChangeLog.ibm
+++ b/gcc/ChangeLog.ibm
@@ -1,3 +1,8 @@
+2015-05-15 Peter Bergner <bergner@vnet.ibm.com>
+
+ Merge up to 223200.
+ * REVISION: Update subversion id.
+
2015-04-13 Michael Meissner <meissner@linux.vnet.ibm.com>
Merge up to 221992.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 19ab123f5e5..d407c21fb8d 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20150410
+20150514
diff --git a/gcc/REVISION b/gcc/REVISION
index 03bacb4897a..8efe17ad1d8 100644
--- a/gcc/REVISION
+++ b/gcc/REVISION
@@ -1 +1 @@
-[ibm/gcc-4_8-branch merged from gcc-4_8-branch, revision 221992]
+[ibm/gcc-4_8-branch merged from gcc-4_8-branch, revision 223200]
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index c879024ebf6..f5c0761d4f1 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -2612,6 +2612,8 @@
DONE;
}
}
+ else
+ FAIL;
}
)
@@ -2681,16 +2683,6 @@
(set_attr "mode" "SI")]
)
-(define_insn "*ashl<mode>3_insn"
- [(set (match_operand:SHORT 0 "register_operand" "=r")
- (ashift:SHORT (match_operand:SHORT 1 "register_operand" "r")
- (match_operand:QI 2 "aarch64_reg_or_shift_imm_si" "rUss")))]
- ""
- "lsl\\t%<w>0, %<w>1, %<w>2"
- [(set_attr "v8type" "shift")
- (set_attr "mode" "<MODE>")]
-)
-
(define_insn "*<optab><mode>3_insn"
[(set (match_operand:SHORT 0 "register_operand" "=r")
(ASHIFT:SHORT (match_operand:SHORT 1 "register_operand" "r")
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 697057f73f1..532c452665a 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -2453,7 +2453,7 @@
}
})
-(define_insn "*altivec_lvx_<mode>_internal"
+(define_insn "altivec_lvx_<mode>_internal"
[(parallel
[(set (match_operand:VM2 0 "register_operand" "=v")
(match_operand:VM2 1 "memory_operand" "Z"))
@@ -2476,7 +2476,7 @@
}
})
-(define_insn "*altivec_stvx_<mode>_internal"
+(define_insn "altivec_stvx_<mode>_internal"
[(parallel
[(set (match_operand:VM2 0 "memory_operand" "=Z")
(match_operand:VM2 1 "register_operand" "v"))
diff --git a/gcc/config/rs6000/crypto.md b/gcc/config/rs6000/crypto.md
index 9f7e4a1b255..683a340e119 100644
--- a/gcc/config/rs6000/crypto.md
+++ b/gcc/config/rs6000/crypto.md
@@ -18,6 +18,15 @@
;; along with GCC; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>.
+;; NOTE: Although this file contains all the instructions from
+;; section 5.11 of ISA 2.07, only those in sections 5.11.1 and
+;; 5.11.2 are in Category:Vector.Crypto. Those are the only
+;; ones controlled by -m[no-]crypto.
+
+;; FIXME: The builtin names for the instructions in this file
+;; are likely to be deprecated in favor of other names to be
+;; agreed upon with the XL compilers and LLVM.
+
(define_c_enum "unspec"
[UNSPEC_VCIPHER
UNSPEC_VNCIPHER
@@ -65,7 +74,7 @@
(unspec:CR_mode [(match_operand:CR_mode 1 "register_operand" "v")
(match_operand:CR_mode 2 "register_operand" "v")]
UNSPEC_VPMSUM))]
- "TARGET_CRYPTO"
+ "TARGET_P8_VECTOR"
"vpmsum<CR_char> %0,%1,%2"
[(set_attr "type" "crypto")])
@@ -76,7 +85,7 @@
(match_operand:CR_mode 2 "register_operand" "v")
(match_operand:CR_mode 3 "register_operand" "v")]
UNSPEC_VPERMXOR))]
- "TARGET_CRYPTO"
+ "TARGET_P8_VECTOR"
"vpermxor %0,%1,%2,%3"
[(set_attr "type" "crypto")])
diff --git a/gcc/config/rs6000/htm.md b/gcc/config/rs6000/htm.md
index 1b5b8bf6508..dbfd0db5962 100644
--- a/gcc/config/rs6000/htm.md
+++ b/gcc/config/rs6000/htm.md
@@ -1,5 +1,5 @@
;; Hardware Transactional Memory (HTM) patterns.
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
;; Contributed by Peter Bergner <bergner@vnet.ibm.com>.
;; This file is part of GCC.
@@ -32,191 +32,52 @@
(define_c_enum "unspecv"
[UNSPECV_HTM_TABORT
- UNSPECV_HTM_TABORTDC
- UNSPECV_HTM_TABORTDCI
- UNSPECV_HTM_TABORTWC
- UNSPECV_HTM_TABORTWCI
+ UNSPECV_HTM_TABORTXC
+ UNSPECV_HTM_TABORTXCI
UNSPECV_HTM_TBEGIN
UNSPECV_HTM_TCHECK
UNSPECV_HTM_TEND
UNSPECV_HTM_TRECHKPT
UNSPECV_HTM_TRECLAIM
UNSPECV_HTM_TSR
+ UNSPECV_HTM_TTEST
UNSPECV_HTM_MFSPR
UNSPECV_HTM_MTSPR
])
-(define_expand "tabort"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand:SI 1 "int_reg_operand" "")]
- UNSPECV_HTM_TABORT))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tabort_internal"
+(define_insn "tabort"
[(set (match_operand:CC 1 "cc_reg_operand" "=x")
- (unspec_volatile:CC [(match_operand:SI 0 "int_reg_operand" "r")]
+ (unspec_volatile:CC [(match_operand:SI 0 "gpc_reg_operand" "r")]
UNSPECV_HTM_TABORT))]
"TARGET_HTM"
"tabort. %0"
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tabortdc"
- [(set (match_dup 4)
- (unspec_volatile:CC [(match_operand 1 "u5bit_cint_operand" "n")
- (match_operand:SI 2 "gpc_reg_operand" "r")
- (match_operand:SI 3 "gpc_reg_operand" "r")]
- UNSPECV_HTM_TABORTDC))
- (set (match_dup 5)
- (eq:SI (match_dup 4)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 5)))]
- "TARGET_HTM"
-{
- operands[4] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[5] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tabortdc_internal"
+(define_insn "tabort<wd>c"
[(set (match_operand:CC 3 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand 0 "u5bit_cint_operand" "n")
- (match_operand:SI 1 "gpc_reg_operand" "r")
- (match_operand:SI 2 "gpc_reg_operand" "r")]
- UNSPECV_HTM_TABORTDC))]
+ (match_operand:GPR 1 "gpc_reg_operand" "r")
+ (match_operand:GPR 2 "gpc_reg_operand" "r")]
+ UNSPECV_HTM_TABORTXC))]
"TARGET_HTM"
- "tabortdc. %0,%1,%2"
+ "tabort<wd>c. %0,%1,%2"
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tabortdci"
- [(set (match_dup 4)
- (unspec_volatile:CC [(match_operand 1 "u5bit_cint_operand" "n")
- (match_operand:SI 2 "gpc_reg_operand" "r")
- (match_operand 3 "s5bit_cint_operand" "n")]
- UNSPECV_HTM_TABORTDCI))
- (set (match_dup 5)
- (eq:SI (match_dup 4)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 5)))]
- "TARGET_HTM"
-{
- operands[4] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[5] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tabortdci_internal"
+(define_insn "tabort<wd>ci"
[(set (match_operand:CC 3 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand 0 "u5bit_cint_operand" "n")
- (match_operand:SI 1 "gpc_reg_operand" "r")
+ (match_operand:GPR 1 "gpc_reg_operand" "r")
(match_operand 2 "s5bit_cint_operand" "n")]
- UNSPECV_HTM_TABORTDCI))]
- "TARGET_HTM"
- "tabortdci. %0,%1,%2"
- [(set_attr "type" "htm")
- (set_attr "length" "4")])
-
-(define_expand "tabortwc"
- [(set (match_dup 4)
- (unspec_volatile:CC [(match_operand 1 "u5bit_cint_operand" "n")
- (match_operand:SI 2 "gpc_reg_operand" "r")
- (match_operand:SI 3 "gpc_reg_operand" "r")]
- UNSPECV_HTM_TABORTWC))
- (set (match_dup 5)
- (eq:SI (match_dup 4)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 5)))]
- "TARGET_HTM"
-{
- operands[4] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[5] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tabortwc_internal"
- [(set (match_operand:CC 3 "cc_reg_operand" "=x")
- (unspec_volatile:CC [(match_operand 0 "u5bit_cint_operand" "n")
- (match_operand:SI 1 "gpc_reg_operand" "r")
- (match_operand:SI 2 "gpc_reg_operand" "r")]
- UNSPECV_HTM_TABORTWC))]
+ UNSPECV_HTM_TABORTXCI))]
"TARGET_HTM"
- "tabortwc. %0,%1,%2"
+ "tabort<wd>ci. %0,%1,%2"
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tabortwci"
- [(set (match_dup 4)
- (unspec_volatile:CC [(match_operand 1 "u5bit_cint_operand" "n")
- (match_operand:SI 2 "gpc_reg_operand" "r")
- (match_operand 3 "s5bit_cint_operand" "n")]
- UNSPECV_HTM_TABORTWCI))
- (set (match_dup 5)
- (eq:SI (match_dup 4)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 5)))]
- "TARGET_HTM"
-{
- operands[4] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[5] = gen_reg_rtx (SImode);
-})
-
-(define_expand "ttest"
- [(set (match_dup 1)
- (unspec_volatile:CC [(const_int 0)
- (reg:SI 0)
- (const_int 0)]
- UNSPECV_HTM_TABORTWCI))
- (set (subreg:CC (match_dup 2) 0) (match_dup 1))
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
- (parallel [(set (match_operand:SI 0 "int_reg_operand" "")
- (and:SI (match_dup 3) (const_int 15)))
- (clobber (scratch:CC))])]
- "TARGET_HTM"
-{
- operands[1] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[2] = gen_reg_rtx (SImode);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tabortwci_internal"
- [(set (match_operand:CC 3 "cc_reg_operand" "=x")
- (unspec_volatile:CC [(match_operand 0 "u5bit_cint_operand" "n")
- (match_operand:SI 1 "gpc_reg_operand" "r")
- (match_operand 2 "s5bit_cint_operand" "n")]
- UNSPECV_HTM_TABORTWCI))]
- "TARGET_HTM"
- "tabortwci. %0,%1,%2"
- [(set_attr "type" "htm")
- (set_attr "length" "4")])
-
-(define_expand "tbegin"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand 1 "const_0_to_1_operand" "n")]
- UNSPECV_HTM_TBEGIN))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tbegin_internal"
+(define_insn "tbegin"
[(set (match_operand:CC 1 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand 0 "const_0_to_1_operand" "n")]
UNSPECV_HTM_TBEGIN))]
@@ -225,46 +86,16 @@
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tcheck"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand 1 "u3bit_cint_operand" "n")]
- UNSPECV_HTM_TCHECK))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tcheck_internal"
- [(set (match_operand:CC 1 "cc_reg_operand" "=x")
- (unspec_volatile:CC [(match_operand 0 "u3bit_cint_operand" "n")]
+(define_insn "tcheck"
+ [(set (match_operand:CC 0 "cc_reg_operand" "=y")
+ (unspec_volatile:CC [(const_int 0)]
UNSPECV_HTM_TCHECK))]
"TARGET_HTM"
"tcheck %0"
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tend"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand 1 "const_0_to_1_operand" "n")]
- UNSPECV_HTM_TEND))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tend_internal"
+(define_insn "tend"
[(set (match_operand:CC 1 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand 0 "const_0_to_1_operand" "n")]
UNSPECV_HTM_TEND))]
@@ -273,22 +104,7 @@
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "trechkpt"
- [(set (match_dup 1)
- (unspec_volatile:CC [(const_int 0)]
- UNSPECV_HTM_TRECHKPT))
- (set (match_dup 2)
- (eq:SI (match_dup 1)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 2)))]
- "TARGET_HTM"
-{
- operands[1] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[2] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*trechkpt_internal"
+(define_insn "trechkpt"
[(set (match_operand:CC 0 "cc_reg_operand" "=x")
(unspec_volatile:CC [(const_int 0)]
UNSPECV_HTM_TRECHKPT))]
@@ -297,22 +113,7 @@
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "treclaim"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand:SI 1 "gpc_reg_operand" "r")]
- UNSPECV_HTM_TRECLAIM))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*treclaim_internal"
+(define_insn "treclaim"
[(set (match_operand:CC 1 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand:SI 0 "gpc_reg_operand" "r")]
UNSPECV_HTM_TRECLAIM))]
@@ -321,22 +122,7 @@
[(set_attr "type" "htm")
(set_attr "length" "4")])
-(define_expand "tsr"
- [(set (match_dup 2)
- (unspec_volatile:CC [(match_operand 1 "const_0_to_1_operand" "n")]
- UNSPECV_HTM_TSR))
- (set (match_dup 3)
- (eq:SI (match_dup 2)
- (const_int 0)))
- (set (match_operand:SI 0 "int_reg_operand" "")
- (minus:SI (const_int 1) (match_dup 3)))]
- "TARGET_HTM"
-{
- operands[2] = gen_rtx_REG (CCmode, CR0_REGNO);
- operands[3] = gen_reg_rtx (SImode);
-})
-
-(define_insn "*tsr_internal"
+(define_insn "tsr"
[(set (match_operand:CC 1 "cc_reg_operand" "=x")
(unspec_volatile:CC [(match_operand 0 "const_0_to_1_operand" "n")]
UNSPECV_HTM_TSR))]
@@ -345,21 +131,30 @@
[(set_attr "type" "htm")
(set_attr "length" "4")])
+(define_insn "ttest"
+ [(set (match_operand:CC 0 "cc_reg_operand" "=x")
+ (unspec_volatile:CC [(const_int 0)]
+ UNSPECV_HTM_TTEST))]
+ "TARGET_HTM"
+ "tabortwci. 0,1,0"
+ [(set_attr "type" "htm")
+ (set_attr "length" "4")])
+
(define_insn "htm_mfspr_<mode>"
- [(set (match_operand:P 0 "gpc_reg_operand" "=r")
- (unspec_volatile:P [(match_operand 1 "u10bit_cint_operand" "n")
- (match_operand:P 2 "htm_spr_reg_operand" "")]
- UNSPECV_HTM_MFSPR))]
+ [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
+ (unspec_volatile:GPR [(match_operand 1 "u10bit_cint_operand" "n")
+ (match_operand:GPR 2 "htm_spr_reg_operand" "")]
+ UNSPECV_HTM_MFSPR))]
"TARGET_HTM"
"mfspr %0,%1";
[(set_attr "type" "htm")
(set_attr "length" "4")])
(define_insn "htm_mtspr_<mode>"
- [(set (match_operand:P 2 "htm_spr_reg_operand" "")
- (unspec_volatile:P [(match_operand:P 0 "gpc_reg_operand" "r")
- (match_operand 1 "u10bit_cint_operand" "n")]
- UNSPECV_HTM_MTSPR))]
+ [(set (match_operand:GPR 2 "htm_spr_reg_operand" "")
+ (unspec_volatile:GPR [(match_operand:GPR 0 "gpc_reg_operand" "r")
+ (match_operand 1 "u10bit_cint_operand" "n")]
+ UNSPECV_HTM_MTSPR))]
"TARGET_HTM"
"mtspr %1,%0";
[(set_attr "type" "htm")
diff --git a/gcc/config/rs6000/htmxlintrin.h b/gcc/config/rs6000/htmxlintrin.h
index 3908229d5a8..24721b3102d 100644
--- a/gcc/config/rs6000/htmxlintrin.h
+++ b/gcc/config/rs6000/htmxlintrin.h
@@ -81,7 +81,8 @@ extern __inline long
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
__TM_end (void)
{
- if (__builtin_expect (__builtin_tend (0), 1))
+ unsigned char status = _HTM_STATE (__builtin_tend (0));
+ if (__builtin_expect (status, _HTM_TRANSACTIONAL))
return 1;
return 0;
}
diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def
index 3d7ee36a6a2..7497df3da75 100644
--- a/gcc/config/rs6000/rs6000-builtin.def
+++ b/gcc/config/rs6000/rs6000-builtin.def
@@ -392,6 +392,14 @@
| RS6000_BTC_BINARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_CRYPTO_2A(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_2 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_BINARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
+
#define BU_CRYPTO_3(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
@@ -400,6 +408,14 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_ ## ICODE) /* ICODE */
+#define BU_CRYPTO_3A(ENUM, NAME, ATTR, ICODE) \
+ RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_ ## ATTR /* ATTR */ \
+ | RS6000_BTC_TERNARY), \
+ CODE_FOR_ ## ICODE) /* ICODE */
+
#define BU_CRYPTO_OVERLOAD_1(ENUM, NAME) \
RS6000_BUILTIN_1 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
@@ -408,10 +424,10 @@
| RS6000_BTC_UNARY), \
CODE_FOR_nothing) /* ICODE */
-#define BU_CRYPTO_OVERLOAD_2(ENUM, NAME) \
+#define BU_CRYPTO_OVERLOAD_2A(ENUM, NAME) \
RS6000_BUILTIN_2 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_crypto_" NAME, /* NAME */ \
- RS6000_BTM_CRYPTO, /* MASK */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
(RS6000_BTC_OVERLOADED /* ATTR */ \
| RS6000_BTC_BINARY), \
CODE_FOR_nothing) /* ICODE */
@@ -424,6 +440,14 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_nothing) /* ICODE */
+#define BU_CRYPTO_OVERLOAD_3A(ENUM, NAME) \
+ RS6000_BUILTIN_3 (CRYPTO_BUILTIN_ ## ENUM, /* ENUM */ \
+ "__builtin_crypto_" NAME, /* NAME */ \
+ RS6000_BTM_P8_VECTOR, /* MASK */ \
+ (RS6000_BTC_OVERLOADED /* ATTR */ \
+ | RS6000_BTC_TERNARY), \
+ CODE_FOR_nothing) /* ICODE */
+
/* HTM convenience macros. */
#define BU_HTM_0(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_H (HTM_BUILTIN_ ## ENUM, /* ENUM */ \
@@ -456,21 +480,12 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_ ## ICODE) /* ICODE */
-#define BU_HTM_SPR0(ENUM, NAME, ATTR, ICODE) \
- RS6000_BUILTIN_H (HTM_BUILTIN_ ## ENUM, /* ENUM */ \
- "__builtin_" NAME, /* NAME */ \
- RS6000_BTM_HTM, /* MASK */ \
- (RS6000_BTC_ ## ATTR /* ATTR */ \
- | RS6000_BTC_SPR), \
- CODE_FOR_ ## ICODE) /* ICODE */
-
-#define BU_HTM_SPR1(ENUM, NAME, ATTR, ICODE) \
+#define BU_HTM_V1(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_H (HTM_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_" NAME, /* NAME */ \
RS6000_BTM_HTM, /* MASK */ \
(RS6000_BTC_ ## ATTR /* ATTR */ \
| RS6000_BTC_UNARY \
- | RS6000_BTC_SPR \
| RS6000_BTC_VOID), \
CODE_FOR_ ## ICODE) /* ICODE */
@@ -1611,52 +1626,52 @@ BU_CRYPTO_2 (VCIPHER, "vcipher", CONST, crypto_vcipher)
BU_CRYPTO_2 (VCIPHERLAST, "vcipherlast", CONST, crypto_vcipherlast)
BU_CRYPTO_2 (VNCIPHER, "vncipher", CONST, crypto_vncipher)
BU_CRYPTO_2 (VNCIPHERLAST, "vncipherlast", CONST, crypto_vncipherlast)
-BU_CRYPTO_2 (VPMSUMB, "vpmsumb", CONST, crypto_vpmsumb)
-BU_CRYPTO_2 (VPMSUMH, "vpmsumh", CONST, crypto_vpmsumh)
-BU_CRYPTO_2 (VPMSUMW, "vpmsumw", CONST, crypto_vpmsumw)
-BU_CRYPTO_2 (VPMSUMD, "vpmsumd", CONST, crypto_vpmsumd)
+BU_CRYPTO_2A (VPMSUMB, "vpmsumb", CONST, crypto_vpmsumb)
+BU_CRYPTO_2A (VPMSUMH, "vpmsumh", CONST, crypto_vpmsumh)
+BU_CRYPTO_2A (VPMSUMW, "vpmsumw", CONST, crypto_vpmsumw)
+BU_CRYPTO_2A (VPMSUMD, "vpmsumd", CONST, crypto_vpmsumd)
/* 3 argument crypto functions. */
-BU_CRYPTO_3 (VPERMXOR_V2DI, "vpermxor_v2di", CONST, crypto_vpermxor_v2di)
-BU_CRYPTO_3 (VPERMXOR_V4SI, "vpermxor_v4si", CONST, crypto_vpermxor_v4si)
-BU_CRYPTO_3 (VPERMXOR_V8HI, "vpermxor_v8hi", CONST, crypto_vpermxor_v8hi)
-BU_CRYPTO_3 (VPERMXOR_V16QI, "vpermxor_v16qi", CONST, crypto_vpermxor_v16qi)
+BU_CRYPTO_3A (VPERMXOR_V2DI, "vpermxor_v2di", CONST, crypto_vpermxor_v2di)
+BU_CRYPTO_3A (VPERMXOR_V4SI, "vpermxor_v4si", CONST, crypto_vpermxor_v4si)
+BU_CRYPTO_3A (VPERMXOR_V8HI, "vpermxor_v8hi", CONST, crypto_vpermxor_v8hi)
+BU_CRYPTO_3A (VPERMXOR_V16QI, "vpermxor_v16qi", CONST, crypto_vpermxor_v16qi)
BU_CRYPTO_3 (VSHASIGMAW, "vshasigmaw", CONST, crypto_vshasigmaw)
BU_CRYPTO_3 (VSHASIGMAD, "vshasigmad", CONST, crypto_vshasigmad)
/* 2 argument crypto overloaded functions. */
-BU_CRYPTO_OVERLOAD_2 (VPMSUM, "vpmsum")
+BU_CRYPTO_OVERLOAD_2A (VPMSUM, "vpmsum")
/* 3 argument crypto overloaded functions. */
-BU_CRYPTO_OVERLOAD_3 (VPERMXOR, "vpermxor")
+BU_CRYPTO_OVERLOAD_3A (VPERMXOR, "vpermxor")
BU_CRYPTO_OVERLOAD_3 (VSHASIGMA, "vshasigma")
/* HTM functions. */
-BU_HTM_1 (TABORT, "tabort", MISC, tabort)
-BU_HTM_3 (TABORTDC, "tabortdc", MISC, tabortdc)
-BU_HTM_3 (TABORTDCI, "tabortdci", MISC, tabortdci)
-BU_HTM_3 (TABORTWC, "tabortwc", MISC, tabortwc)
-BU_HTM_3 (TABORTWCI, "tabortwci", MISC, tabortwci)
-BU_HTM_1 (TBEGIN, "tbegin", MISC, tbegin)
-BU_HTM_1 (TCHECK, "tcheck", MISC, tcheck)
-BU_HTM_1 (TEND, "tend", MISC, tend)
-BU_HTM_0 (TENDALL, "tendall", MISC, tend)
-BU_HTM_0 (TRECHKPT, "trechkpt", MISC, trechkpt)
-BU_HTM_1 (TRECLAIM, "treclaim", MISC, treclaim)
-BU_HTM_0 (TRESUME, "tresume", MISC, tsr)
-BU_HTM_0 (TSUSPEND, "tsuspend", MISC, tsr)
-BU_HTM_1 (TSR, "tsr", MISC, tsr)
-BU_HTM_0 (TTEST, "ttest", MISC, ttest)
-
-BU_HTM_SPR0 (GET_TFHAR, "get_tfhar", MISC, nothing)
-BU_HTM_SPR1 (SET_TFHAR, "set_tfhar", MISC, nothing)
-BU_HTM_SPR0 (GET_TFIAR, "get_tfiar", MISC, nothing)
-BU_HTM_SPR1 (SET_TFIAR, "set_tfiar", MISC, nothing)
-BU_HTM_SPR0 (GET_TEXASR, "get_texasr", MISC, nothing)
-BU_HTM_SPR1 (SET_TEXASR, "set_texasr", MISC, nothing)
-BU_HTM_SPR0 (GET_TEXASRU, "get_texasru", MISC, nothing)
-BU_HTM_SPR1 (SET_TEXASRU, "set_texasru", MISC, nothing)
+BU_HTM_1 (TABORT, "tabort", CR, tabort)
+BU_HTM_3 (TABORTDC, "tabortdc", CR, tabortdc)
+BU_HTM_3 (TABORTDCI, "tabortdci", CR, tabortdci)
+BU_HTM_3 (TABORTWC, "tabortwc", CR, tabortwc)
+BU_HTM_3 (TABORTWCI, "tabortwci", CR, tabortwci)
+BU_HTM_1 (TBEGIN, "tbegin", CR, tbegin)
+BU_HTM_0 (TCHECK, "tcheck", CR, tcheck)
+BU_HTM_1 (TEND, "tend", CR, tend)
+BU_HTM_0 (TENDALL, "tendall", CR, tend)
+BU_HTM_0 (TRECHKPT, "trechkpt", CR, trechkpt)
+BU_HTM_1 (TRECLAIM, "treclaim", CR, treclaim)
+BU_HTM_0 (TRESUME, "tresume", CR, tsr)
+BU_HTM_0 (TSUSPEND, "tsuspend", CR, tsr)
+BU_HTM_1 (TSR, "tsr", CR, tsr)
+BU_HTM_0 (TTEST, "ttest", CR, ttest)
+
+BU_HTM_0 (GET_TFHAR, "get_tfhar", SPR, nothing)
+BU_HTM_V1 (SET_TFHAR, "set_tfhar", SPR, nothing)
+BU_HTM_0 (GET_TFIAR, "get_tfiar", SPR, nothing)
+BU_HTM_V1 (SET_TFIAR, "set_tfiar", SPR, nothing)
+BU_HTM_0 (GET_TEXASR, "get_texasr", SPR, nothing)
+BU_HTM_V1 (SET_TEXASR, "set_texasr", SPR, nothing)
+BU_HTM_0 (GET_TEXASRU, "get_texasru", SPR, nothing)
+BU_HTM_V1 (SET_TEXASRU, "set_texasru", SPR, nothing)
/* 3 argument paired floating point builtins. */
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3855588016e..bbc40960a4c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4029,6 +4029,22 @@ rs6000_option_override_internal (bool global_init_p)
}
}
+ /* Determine when unaligned vector accesses are permitted, and when
+ they are preferred over masked Altivec loads. Note that if
+ TARGET_ALLOW_MOVMISALIGN has been disabled by the user, then
+ TARGET_EFFICIENT_UNALIGNED_VSX must be as well. The converse is
+ not true. */
+ if (TARGET_EFFICIENT_UNALIGNED_VSX == -1) {
+ if (TARGET_VSX && rs6000_cpu == PROCESSOR_POWER8
+ && TARGET_ALLOW_MOVMISALIGN != 0)
+ TARGET_EFFICIENT_UNALIGNED_VSX = 1;
+ else
+ TARGET_EFFICIENT_UNALIGNED_VSX = 0;
+ }
+
+ if (TARGET_ALLOW_MOVMISALIGN == -1 && rs6000_cpu == PROCESSOR_POWER8)
+ TARGET_ALLOW_MOVMISALIGN = 1;
+
/* Set the builtin mask of the various options used that could affect which
builtins were used. In the past we used target_flags, but we've run out
of bits, and some options like SPE and PAIRED are no longer in
@@ -4106,7 +4122,9 @@ rs6000_option_override (void)
static tree
rs6000_builtin_mask_for_load (void)
{
- if (TARGET_ALTIVEC || TARGET_VSX)
+ /* Don't use lvsl/vperm for P8 and similarly efficient machines. */
+ if ((TARGET_ALTIVEC && !TARGET_VSX)
+ || (TARGET_VSX && !TARGET_EFFICIENT_UNALIGNED_VSX))
return altivec_builtin_mask_for_load;
else
return 0;
@@ -4185,6 +4203,9 @@ rs6000_builtin_support_vector_misalignment (enum machine_mode mode,
{
if (TARGET_VSX)
{
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return true;
+
/* Return if movmisalign pattern is not supported for this mode. */
if (optab_handler (movmisalign_optab, mode) == CODE_FOR_nothing)
return false;
@@ -4248,6 +4269,9 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
return 3;
case unaligned_load:
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return 1;
+
if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
{
elements = TYPE_VECTOR_SUBPARTS (vectype);
@@ -4283,6 +4307,9 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost,
return 2;
case unaligned_store:
+ if (TARGET_EFFICIENT_UNALIGNED_VSX)
+ return 1;
+
if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN)
{
elements = TYPE_VECTOR_SUBPARTS (vectype);
@@ -8233,6 +8260,11 @@ rs6000_emit_le_vsx_store (rtx dest, rtx source, enum machine_mode mode)
{
rtx tmp, permute_src, permute_tmp;
+ /* This should never be called during or after reload, because it does
+ not re-permute the source register. It is intended only for use
+ during expand. */
+ gcc_assert (!reload_in_progress && !lra_in_progress && !reload_completed);
+
/* Use V2DImode to do swaps of types with 128-bit scalare parts (TImode,
V1TImode). */
if (mode == TImode || mode == V1TImode)
@@ -12392,9 +12424,9 @@ static inline enum insn_code
rs6000_htm_spr_icode (bool nonvoid)
{
if (nonvoid)
- return (TARGET_64BIT) ? CODE_FOR_htm_mfspr_di : CODE_FOR_htm_mfspr_si;
+ return (TARGET_POWERPC64) ? CODE_FOR_htm_mfspr_di : CODE_FOR_htm_mfspr_si;
else
- return (TARGET_64BIT) ? CODE_FOR_htm_mtspr_di : CODE_FOR_htm_mtspr_si;
+ return (TARGET_POWERPC64) ? CODE_FOR_htm_mtspr_di : CODE_FOR_htm_mtspr_si;
}
/* Expand the HTM builtin in EXP and store the result in TARGET.
@@ -12408,7 +12440,17 @@ htm_expand_builtin (tree exp, rtx target, bool * expandedp)
const struct builtin_description *d;
size_t i;
- *expandedp = false;
+ *expandedp = true;
+
+ if (!TARGET_POWERPC64
+ && (fcode == HTM_BUILTIN_TABORTDC
+ || fcode == HTM_BUILTIN_TABORTDCI))
+ {
+ size_t uns_fcode = (size_t)fcode;
+ const char *name = rs6000_builtin_info[uns_fcode].name;
+ error ("builtin %s is only valid in 64-bit mode", name);
+ return const0_rtx;
+ }
/* Expand the HTM builtins. */
d = bdesc_htm;
@@ -12421,26 +12463,29 @@ htm_expand_builtin (tree exp, rtx target, bool * expandedp)
call_expr_arg_iterator iter;
unsigned attr = rs6000_builtin_info[fcode].attr;
enum insn_code icode = d->icode;
+ const struct insn_operand_data *insn_op;
+ bool uses_spr = (attr & RS6000_BTC_SPR);
+ rtx cr = NULL_RTX;
- if (attr & RS6000_BTC_SPR)
+ if (uses_spr)
icode = rs6000_htm_spr_icode (nonvoid);
+ insn_op = &insn_data[icode].operand[0];
if (nonvoid)
{
- enum machine_mode tmode = insn_data[icode].operand[0].mode;
+ machine_mode tmode = (uses_spr) ? insn_op->mode : SImode;
if (!target
|| GET_MODE (target) != tmode
- || !(*insn_data[icode].operand[0].predicate) (target, tmode))
+ || (uses_spr && !(*insn_op->predicate) (target, tmode)))
target = gen_reg_rtx (tmode);
- op[nopnds++] = target;
+ if (uses_spr)
+ op[nopnds++] = target;
}
FOR_EACH_CALL_EXPR_ARG (arg, iter, exp)
{
- const struct insn_operand_data *insn_op;
-
if (arg == error_mark_node || nopnds >= MAX_HTM_OPERANDS)
- return NULL_RTX;
+ return const0_rtx;
insn_op = &insn_data[icode].operand[nopnds];
@@ -12487,10 +12532,17 @@ htm_expand_builtin (tree exp, rtx target, bool * expandedp)
/* If this builtin accesses SPRs, then pass in the appropriate
SPR number and SPR regno as the last two operands. */
- if (attr & RS6000_BTC_SPR)
+ if (uses_spr)
{
- op[nopnds++] = gen_rtx_CONST_INT (Pmode, htm_spr_num (fcode));
- op[nopnds++] = gen_rtx_REG (Pmode, htm_spr_regno (fcode));
+ machine_mode mode = (TARGET_POWERPC64) ? DImode : SImode;
+ op[nopnds++] = gen_rtx_CONST_INT (mode, htm_spr_num (fcode));
+ op[nopnds++] = gen_rtx_REG (mode, htm_spr_regno (fcode));
+ }
+ /* If this builtin accesses a CR, then pass in a scratch
+ CR as the last operand. */
+ else if (attr & RS6000_BTC_CR)
+ { cr = gen_reg_rtx (CCmode);
+ op[nopnds++] = cr;
}
#ifdef ENABLE_CHECKING
@@ -12503,7 +12555,7 @@ htm_expand_builtin (tree exp, rtx target, bool * expandedp)
expected_nopnds = 3;
if (!(attr & RS6000_BTC_VOID))
expected_nopnds += 1;
- if (attr & RS6000_BTC_SPR)
+ if (uses_spr)
expected_nopnds += 2;
gcc_assert (nopnds == expected_nopnds && nopnds <= MAX_HTM_OPERANDS);
@@ -12533,12 +12585,41 @@ htm_expand_builtin (tree exp, rtx target, bool * expandedp)
return NULL_RTX;
emit_insn (pat);
- *expandedp = true;
+ if (attr & RS6000_BTC_CR)
+ {
+ if (fcode == HTM_BUILTIN_TBEGIN)
+ {
+ /* Emit code to set TARGET to true or false depending on
+ whether the tbegin. instruction successfully or failed
+ to start a transaction. We do this by placing the 1's
+ complement of CR's EQ bit into TARGET. */
+ rtx scratch = gen_reg_rtx (SImode);
+ emit_insn (gen_rtx_SET (VOIDmode, scratch,
+ gen_rtx_EQ (SImode, cr,
+ const0_rtx)));
+ emit_insn (gen_rtx_SET (VOIDmode, target,
+ gen_rtx_XOR (SImode, scratch,
+ GEN_INT (1))));
+ }
+ else
+ {
+ /* Emit code to copy the 4-bit condition register field
+ CR into the least significant end of register TARGET. */
+ rtx scratch1 = gen_reg_rtx (SImode);
+ rtx scratch2 = gen_reg_rtx (SImode);
+ rtx subreg = simplify_gen_subreg (CCmode, scratch1, SImode, 0);
+ emit_insn (gen_movcc (subreg, cr));
+ emit_insn (gen_lshrsi3 (scratch2, scratch1, GEN_INT (28)));
+ emit_insn (gen_andsi3 (target, scratch2, GEN_INT (0xf)));
+ }
+ }
+
if (nonvoid)
return target;
return const0_rtx;
}
+ *expandedp = false;
return NULL_RTX;
}
@@ -15015,8 +15096,31 @@ htm_init_builtins (void)
bool void_func = (attr & RS6000_BTC_VOID);
int attr_args = (attr & RS6000_BTC_TYPE_MASK);
int nopnds = 0;
- tree argtype = (attr & RS6000_BTC_SPR) ? long_unsigned_type_node
- : unsigned_type_node;
+ tree gpr_type_node;
+ tree rettype;
+ tree argtype;
+
+ if (TARGET_32BIT && TARGET_POWERPC64)
+ gpr_type_node = long_long_unsigned_type_node;
+ else
+ gpr_type_node = long_unsigned_type_node;
+
+ if (attr & RS6000_BTC_SPR)
+ {
+ rettype = gpr_type_node;
+ argtype = gpr_type_node;
+ }
+ else if (d->code == HTM_BUILTIN_TABORTDC
+ || d->code == HTM_BUILTIN_TABORTDCI)
+ {
+ rettype = unsigned_type_node;
+ argtype = gpr_type_node;
+ }
+ else
+ {
+ rettype = unsigned_type_node;
+ argtype = unsigned_type_node;
+ }
if ((mask & builtin_mask) != mask)
{
@@ -15033,7 +15137,7 @@ htm_init_builtins (void)
continue;
}
- op[nopnds++] = (void_func) ? void_type_node : argtype;
+ op[nopnds++] = (void_func) ? void_type_node : rettype;
if (attr_args == RS6000_BTC_UNARY)
op[nopnds++] = argtype;
@@ -22409,7 +22513,7 @@ output_probe_stack_range (rtx reg1, rtx reg2)
static rtx
rs6000_frame_related (rtx insn, rtx reg, HOST_WIDE_INT val,
- rtx reg2, rtx rreg, rtx split_reg)
+ rtx reg2, rtx rreg)
{
rtx real, temp;
@@ -22500,11 +22604,6 @@ rs6000_frame_related (rtx insn, rtx reg, HOST_WIDE_INT val,
}
}
- /* If a store insn has been split into multiple insns, the
- true source register is given by split_reg. */
- if (split_reg != NULL_RTX)
- real = gen_rtx_SET (VOIDmode, SET_DEST (real), split_reg);
-
RTX_FRAME_RELATED_P (insn) = 1;
add_reg_note (insn, REG_FRAME_RELATED_EXPR, real);
@@ -22612,7 +22711,7 @@ emit_frame_save (rtx frame_reg, enum machine_mode mode,
reg = gen_rtx_REG (mode, regno);
insn = emit_insn (gen_frame_store (reg, frame_reg, offset));
return rs6000_frame_related (insn, frame_reg, frame_reg_to_sp,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
/* Emit an offset memory reference suitable for a frame store, while
@@ -23181,7 +23280,7 @@ rs6000_emit_prologue (void)
insn = emit_insn (gen_rtx_PARALLEL (VOIDmode, p));
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- treg, GEN_INT (-info->total_size), NULL_RTX);
+ treg, GEN_INT (-info->total_size));
sp_off = frame_off = info->total_size;
}
@@ -23266,7 +23365,7 @@ rs6000_emit_prologue (void)
insn = emit_move_insn (mem, reg);
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
END_USE (0);
}
}
@@ -23322,7 +23421,7 @@ rs6000_emit_prologue (void)
info->lr_save_offset,
DFmode, sel);
rs6000_frame_related (insn, ptr_reg, sp_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (lr)
END_USE (0);
}
@@ -23401,7 +23500,7 @@ rs6000_emit_prologue (void)
SAVRES_SAVE | SAVRES_GPR);
rs6000_frame_related (insn, spe_save_area_ptr, sp_off - save_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
/* Move the static chain pointer back. */
@@ -23451,7 +23550,7 @@ rs6000_emit_prologue (void)
info->lr_save_offset + ptr_off,
reg_mode, sel);
rs6000_frame_related (insn, ptr_reg, sp_off - ptr_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (lr)
END_USE (0);
}
@@ -23467,7 +23566,7 @@ rs6000_emit_prologue (void)
info->gp_save_offset + frame_off + reg_size * i);
insn = emit_insn (gen_rtx_PARALLEL (VOIDmode, p));
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
}
else if (!WORLD_SAVE_P (info))
{
@@ -23790,7 +23889,7 @@ rs6000_emit_prologue (void)
info->altivec_save_offset + ptr_off,
0, V4SImode, SAVRES_SAVE | SAVRES_VR);
rs6000_frame_related (insn, scratch_reg, sp_off - ptr_off,
- NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, NULL_RTX);
if (REGNO (frame_reg_rtx) == REGNO (scratch_reg))
{
/* The oddity mentioned above clobbered our frame reg. */
@@ -23806,7 +23905,7 @@ rs6000_emit_prologue (void)
for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i)
if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
{
- rtx areg, savereg, mem, split_reg;
+ rtx areg, savereg, mem;
int offset;
offset = (info->altivec_save_offset + frame_off
@@ -23822,20 +23921,13 @@ rs6000_emit_prologue (void)
mem = gen_frame_mem (V4SImode,
gen_rtx_PLUS (Pmode, frame_reg_rtx, areg));
- insn = emit_move_insn (mem, savereg);
-
- /* When we split a VSX store into two insns, we need to make
- sure the DWARF info knows which register we are storing.
- Pass it in to be used on the appropriate note. */
- if (!BYTES_BIG_ENDIAN
- && GET_CODE (PATTERN (insn)) == SET
- && GET_CODE (SET_SRC (PATTERN (insn))) == VEC_SELECT)
- split_reg = savereg;
- else
- split_reg = NULL_RTX;
+ /* Rather than emitting a generic move, force use of the stvx
+ instruction, which we always want. In particular we don't
+ want xxpermdi/stxvd2x for little endian. */
+ insn = emit_insn (gen_altivec_stvx_v4si_internal (mem, savereg));
rs6000_frame_related (insn, frame_reg_rtx, sp_off - frame_off,
- areg, GEN_INT (offset), split_reg);
+ areg, GEN_INT (offset));
}
}
@@ -24477,7 +24569,10 @@ rs6000_emit_epilogue (int sibcall)
mem = gen_frame_mem (V4SImode, addr);
reg = gen_rtx_REG (V4SImode, i);
- emit_move_insn (reg, mem);
+ /* Rather than emitting a generic move, force use of the
+ lvx instruction, which we always want. In particular
+ we don't want lxvd2x/xxpermdi for little endian. */
+ (void) emit_insn (gen_altivec_lvx_v4si_internal (reg, mem));
}
}
@@ -24675,7 +24770,10 @@ rs6000_emit_epilogue (int sibcall)
mem = gen_frame_mem (V4SImode, addr);
reg = gen_rtx_REG (V4SImode, i);
- emit_move_insn (reg, mem);
+ /* Rather than emitting a generic move, force use of the
+ lvx instruction, which we always want. In particular
+ we don't want lxvd2x/xxpermdi for little endian. */
+ (void) emit_insn (gen_altivec_lvx_v4si_internal (reg, mem));
}
}
@@ -31619,10 +31717,11 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] =
{ "quad-memory", OPTION_MASK_QUAD_MEMORY, false, true },
{ "quad-memory-atomic", OPTION_MASK_QUAD_MEMORY_ATOMIC, false, true },
{ "recip-precision", OPTION_MASK_RECIP_PRECISION, false, true },
+ { "save-toc-indirect", OPTION_MASK_SAVE_TOC_INDIRECT, false, true },
{ "string", OPTION_MASK_STRING, false, true },
{ "update", OPTION_MASK_NO_UPDATE, true , true },
- { "upper-regs-df", OPTION_MASK_UPPER_REGS_DF, false, false },
- { "upper-regs-sf", OPTION_MASK_UPPER_REGS_SF, false, false },
+ { "upper-regs-df", OPTION_MASK_UPPER_REGS_DF, false, true },
+ { "upper-regs-sf", OPTION_MASK_UPPER_REGS_SF, false, true },
{ "vsx", OPTION_MASK_VSX, false, true },
{ "vsx-timode", OPTION_MASK_VSX_TIMODE, false, true },
#ifdef OPTION_MASK_64BIT
@@ -31695,6 +31794,42 @@ static struct rs6000_opt_var const rs6000_opt_vars[] =
{ "longcall",
offsetof (struct gcc_options, x_rs6000_default_long_calls),
offsetof (struct cl_target_option, x_rs6000_default_long_calls), },
+ { "optimize-swaps",
+ offsetof (struct gcc_options, x_rs6000_optimize_swaps),
+ offsetof (struct cl_target_option, x_rs6000_optimize_swaps), },
+ { "allow-movmisalign",
+ offsetof (struct gcc_options, x_TARGET_ALLOW_MOVMISALIGN),
+ offsetof (struct cl_target_option, x_TARGET_ALLOW_MOVMISALIGN), },
+ { "allow-df-permute",
+ offsetof (struct gcc_options, x_TARGET_ALLOW_DF_PERMUTE),
+ offsetof (struct cl_target_option, x_TARGET_ALLOW_DF_PERMUTE), },
+ { "sched-groups",
+ offsetof (struct gcc_options, x_TARGET_SCHED_GROUPS),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_GROUPS), },
+ { "always-hint",
+ offsetof (struct gcc_options, x_TARGET_ALWAYS_HINT),
+ offsetof (struct cl_target_option, x_TARGET_ALWAYS_HINT), },
+ { "align-branch-targets",
+ offsetof (struct gcc_options, x_TARGET_ALIGN_BRANCH_TARGETS),
+ offsetof (struct cl_target_option, x_TARGET_ALIGN_BRANCH_TARGETS), },
+ { "vectorize-builtins",
+ offsetof (struct gcc_options, x_TARGET_VECTORIZE_BUILTINS),
+ offsetof (struct cl_target_option, x_TARGET_VECTORIZE_BUILTINS), },
+ { "tls-markers",
+ offsetof (struct gcc_options, x_tls_markers),
+ offsetof (struct cl_target_option, x_tls_markers), },
+ { "sched-prolog",
+ offsetof (struct gcc_options, x_TARGET_SCHED_PROLOG),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_PROLOG), },
+ { "sched-epilog",
+ offsetof (struct gcc_options, x_TARGET_SCHED_PROLOG),
+ offsetof (struct cl_target_option, x_TARGET_SCHED_PROLOG), },
+ { "gen-cell-microcode",
+ offsetof (struct gcc_options, x_rs6000_gen_cell_microcode),
+ offsetof (struct cl_target_option, x_rs6000_gen_cell_microcode), },
+ { "warn-cell-microcode",
+ offsetof (struct gcc_options, x_rs6000_warn_cell_microcode),
+ offsetof (struct cl_target_option, x_rs6000_warn_cell_microcode), },
};
/* Inner function to handle attribute((target("..."))) and #pragma GCC target
@@ -31768,9 +31903,15 @@ rs6000_inner_target_options (tree args, bool attr_p)
rs6000_isa_flags_explicit |= mask;
/* VSX needs altivec, so -mvsx automagically sets
- altivec. */
- if (mask == OPTION_MASK_VSX && !invert)
- mask |= OPTION_MASK_ALTIVEC;
+ altivec and disables -mavoid-indexed-addresses. */
+ if (!invert)
+ {
+ if (mask == OPTION_MASK_VSX)
+ {
+ mask |= OPTION_MASK_ALTIVEC;
+ TARGET_AVOID_XFORM = 0;
+ }
+ }
if (rs6000_opt_masks[i].invert)
invert = !invert;
@@ -31791,6 +31932,7 @@ rs6000_inner_target_options (tree args, bool attr_p)
size_t j = rs6000_opt_vars[i].global_offset;
*((int *) ((char *)&global_options + j)) = !invert;
error_p = false;
+ not_valid_p = false;
break;
}
}
@@ -33619,7 +33761,8 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
order-dependent element, so additional fixup code would be
needed to make those work. Vector set and non-immediate-form
vector splat are element-order sensitive. A few of these
- cases might be workable with special handling if required. */
+ cases might be workable with special handling if required.
+ Adding cost modeling would be appropriate in some cases. */
int val = XINT (op, 1);
switch (val)
{
@@ -33658,12 +33801,6 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
case UNSPEC_VUPKLPX:
case UNSPEC_VUPKLS_V4SF:
case UNSPEC_VUPKLU_V4SF:
- /* The following could be handled as an idiom with XXSPLTW.
- These place a scalar in BE element zero, but the XXSPLTW
- will currently expect it in BE element 2 in a swapped
- region. When one of these feeds an XXSPLTW with no other
- defs/uses either way, we can avoid the lane change for
- XXSPLTW and things will be correct. TBD. */
case UNSPEC_VSX_CVDPSPN:
case UNSPEC_VSX_CVSPDP:
case UNSPEC_VSX_CVSPDPN:
@@ -33686,10 +33823,11 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
{
unsigned int special_op = SH_NONE;
ok &= rtx_is_swappable_p (XEXP (op, i), &special_op);
+ if (special_op == SH_NONE)
+ continue;
/* Ensure we never have two kinds of special handling
for the same insn. */
- if (*special != SH_NONE && special_op != SH_NONE
- && *special != special_op)
+ if (*special != SH_NONE && *special != special_op)
return 0;
*special = special_op;
}
@@ -33698,10 +33836,11 @@ rtx_is_swappable_p (rtx op, unsigned int *special)
{
unsigned int special_op = SH_NONE;
ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op);
+ if (special_op == SH_NONE)
+ continue;
/* Ensure we never have two kinds of special handling
for the same insn. */
- if (*special != SH_NONE && special_op != SH_NONE
- && *special != special_op)
+ if (*special != SH_NONE && *special != special_op)
return 0;
*special = special_op;
}
@@ -33752,6 +33891,36 @@ insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn,
return 0;
}
+ /* A convert to single precision can be left as is provided that
+ all of its uses are in xxspltw instructions that splat BE element
+ zero. */
+ if (GET_CODE (body) == SET
+ && GET_CODE (SET_SRC (body)) == UNSPEC
+ && XINT (SET_SRC (body), 1) == UNSPEC_VSX_CVDPSPN)
+ {
+ df_ref *def_rec;
+
+ for (def_rec = DF_INSN_UID_DEFS (i); *def_rec; def_rec++)
+ {
+ df_ref def = *def_rec;
+ struct df_link *link = DF_REF_CHAIN (def);
+ if (!link)
+ return 0;
+
+ for (; link; link = link->next) {
+ rtx use_insn = DF_REF_INSN (link->ref);
+ rtx use_body = PATTERN (use_insn);
+ if (GET_CODE (use_body) != SET
+ || GET_CODE (SET_SRC (use_body)) != UNSPEC
+ || XINT (SET_SRC (use_body), 1) != UNSPEC_VSX_XXSPLTW
+ || XEXP (XEXP (SET_SRC (use_body), 0), 1) != const0_rtx)
+ return 0;
+ }
+ }
+
+ return 1;
+ }
+
/* Otherwise check the operands for vector lane violations. */
return rtx_is_swappable_p (body, special);
}
@@ -34007,7 +34176,10 @@ permute_store (rtx insn)
static void
adjust_extract (rtx insn)
{
- rtx src = SET_SRC (PATTERN (insn));
+ rtx pattern = PATTERN (insn);
+ if (GET_CODE (pattern) == PARALLEL)
+ pattern = XVECEXP (pattern, 0, 0);
+ rtx src = SET_SRC (pattern);
/* The vec_select may be wrapped in a vec_duplicate for a splat, so
account for that. */
rtx sel = GET_CODE (src) == VEC_DUPLICATE ? XEXP (src, 0) : src;
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 9a6c277c40d..4469e76dd97 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -902,7 +902,8 @@ enum data_align { align_abi, align_opt, align_both };
|| (((MODE) == SFmode || (MODE) == DFmode || (MODE) == TFmode \
|| (MODE) == SDmode || (MODE) == DDmode || (MODE) == TDmode) \
&& (ALIGN) < 32) \
- || (VECTOR_MODE_P ((MODE)) && (((int)(ALIGN)) < VECTOR_ALIGN (MODE))))
+ || (!TARGET_EFFICIENT_UNALIGNED_VSX \
+ && (VECTOR_MODE_P ((MODE)) && (((int)(ALIGN)) < VECTOR_ALIGN (MODE)))))
/* Standard register usage. */
@@ -2491,9 +2492,8 @@ extern int frame_pointer_needed;
/* Miscellaneous information. */
#define RS6000_BTC_SPR 0x01000000 /* function references SPRs. */
#define RS6000_BTC_VOID 0x02000000 /* function has no return value. */
-#define RS6000_BTC_OVERLOADED 0x04000000 /* function is overloaded. */
-#define RS6000_BTC_32BIT 0x08000000 /* function references SPRs. */
-#define RS6000_BTC_64BIT 0x10000000 /* function references SPRs. */
+#define RS6000_BTC_CR 0x04000000 /* function references a CR. */
+#define RS6000_BTC_OVERLOADED 0x08000000 /* function is overloaded. */
#define RS6000_BTC_MISC_MASK 0x1f000000 /* Mask of the misc info. */
/* Convenience macros to document the instruction type. */
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index db7502682b3..ecfcc459562 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -1,6 +1,6 @@
; Options for the rs6000 port of the compiler
;
-; Copyright (C) 2005-2014 Free Software Foundation, Inc.
+; Copyright (C) 2005-2015 Free Software Foundation, Inc.
; Contributed by Aldy Hernandez <aldy@quesejoda.com>.
;
; This file is part of GCC.
@@ -201,31 +201,35 @@ mvsx-scalar-memory
Target Undocumented Report Alias(mupper-regs-df)
mvsx-align-128
-Target Undocumented Report Var(TARGET_VSX_ALIGN_128)
+Target Undocumented Report Var(TARGET_VSX_ALIGN_128) Save
; If -mvsx, set alignment to 128 bits instead of 32/64
mallow-movmisalign
-Target Undocumented Var(TARGET_ALLOW_MOVMISALIGN) Init(-1)
+Target Undocumented Var(TARGET_ALLOW_MOVMISALIGN) Init(-1) Save
; Allow/disallow the movmisalign in DF/DI vectors
+mefficient-unaligned-vector
+Target Undocumented Report Var(TARGET_EFFICIENT_UNALIGNED_VSX) Init(-1) Save
+; Consider unaligned VSX accesses to be efficient/inefficient
+
mallow-df-permute
-Target Undocumented Var(TARGET_ALLOW_DF_PERMUTE)
+Target Undocumented Var(TARGET_ALLOW_DF_PERMUTE) Save
; Allow/disallow permutation of DF/DI vectors
msched-groups
-Target Undocumented Report Var(TARGET_SCHED_GROUPS) Init(-1)
+Target Undocumented Report Var(TARGET_SCHED_GROUPS) Init(-1) Save
; Explicitly set/unset whether rs6000_sched_groups is set
malways-hint
-Target Undocumented Report Var(TARGET_ALWAYS_HINT) Init(-1)
+Target Undocumented Report Var(TARGET_ALWAYS_HINT) Init(-1) Save
; Explicitly set/unset whether rs6000_always_hint is set
malign-branch-targets
-Target Undocumented Report Var(TARGET_ALIGN_BRANCH_TARGETS) Init(-1)
+Target Undocumented Report Var(TARGET_ALIGN_BRANCH_TARGETS) Init(-1) Save
; Explicitly set/unset whether rs6000_align_branch_targets is set
mvectorize-builtins
-Target Undocumented Report Var(TARGET_VECTORIZE_BUILTINS) Init(-1)
+Target Undocumented Report Var(TARGET_VECTORIZE_BUILTINS) Init(-1) Save
; Explicitly control whether we vectorize the builtins or not.
mno-update
@@ -535,7 +539,7 @@ Target Report Var(TARGET_POINTERS_TO_NESTED_FUNCTIONS) Init(1) Save
Use/do not use r11 to hold the static link in calls to functions via pointers.
msave-toc-indirect
-Target Report Var(TARGET_SAVE_TOC_INDIRECT) Save
+Target Report Mask(SAVE_TOC_INDIRECT) Var(rs6000_isa_flags)
Control whether we save the TOC in the prologue for indirect calls or generate the save inline
mvsx-timode
@@ -556,7 +560,7 @@ Use/do not use vector and scalar instructions added in ISA 2.07.
mcrypto
Target Report Mask(CRYPTO) Var(rs6000_isa_flags)
-Use ISA 2.07 crypto instructions
+Use ISA 2.07 Category:Vector.AES and Category:Vector.SHA2 instructions
mdirect-move
Target Report Mask(DIRECT_MOVE) Var(rs6000_isa_flags)
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9239750e472..58f9161c078 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,14 @@
+2015-04-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/65727
+ * semantics.c (maybe_resolve_dummy): Handle null return.
+
+2015-04-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/65721
+ * name-lookup.c (do_class_using_decl): Complain about specifying
+ the current class even if there are dependent bases.
+
2015-01-13 Jason Merrill <jason@redhat.com>
PR c++/64487
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index bb9ef6bc2df..12de2dc616b 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3287,7 +3287,7 @@ do_class_using_decl (tree scope, tree name)
tf_warning_or_error);
if (b_kind < bk_proper_base)
{
- if (!bases_dependent_p)
+ if (!bases_dependent_p || b_kind == bk_same_type)
{
error_not_base_type (scope, current_class_type);
return NULL_TREE;
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 329f12f0900..b833b079a6b 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -9633,8 +9633,9 @@ maybe_resolve_dummy (tree object)
/* In a lambda, need to go through 'this' capture. */
tree lam = CLASSTYPE_LAMBDA_EXPR (current_class_type);
tree cap = lambda_expr_this_capture (lam);
- object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
- RO_NULL, tf_warning_or_error);
+ if (cap && cap != error_mark_node)
+ object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
+ RO_NULL, tf_warning_or_error);
}
return object;
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 2478bb1f324..63d85ff93c0 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -14538,10 +14538,15 @@ The following low level built-in functions are available with
@option{-mhtm} or @option{-mcpu=CPU} where CPU is `power8' or later.
They all generate the machine instruction that is part of the name.
-The HTM built-ins return true or false depending on their success and
-their arguments match exactly the type and order of the associated
-hardware instruction's operands. Refer to the ISA manual for a
-description of each instruction's operands.
+The HTM builtins (with the exception of @code{__builtin_tbegin}) return
+the full 4-bit condition register value set by their associated hardware
+instruction. The header file @code{htmintrin.h} defines some macros that can
+be used to decipher the return value. The @code{__builtin_tbegin} builtin
+returns a simple true or false value depending on whether a transaction was
+successfully started or not. The arguments of the builtins match exactly the
+type and order of the associated hardware instruction's operands, except for
+the @code{__builtin_tcheck} builtin, which does not take any input arguments.
+Refer to the ISA manual for a description of each instruction's operands.
@smallexample
unsigned int __builtin_tbegin (unsigned int)
@@ -14553,7 +14558,7 @@ unsigned int __builtin_tabortdci (unsigned int, unsigned int, int)
unsigned int __builtin_tabortwc (unsigned int, unsigned int, unsigned int)
unsigned int __builtin_tabortwci (unsigned int, unsigned int, int)
-unsigned int __builtin_tcheck (unsigned int)
+unsigned int __builtin_tcheck (void)
unsigned int __builtin_treclaim (unsigned int)
unsigned int __builtin_trechkpt (void)
unsigned int __builtin_tsr (unsigned int)
@@ -14688,7 +14693,7 @@ TM_buff_type TM_buff;
while (1)
@{
- if (__TM_begin (TM_buff))
+ if (__TM_begin (TM_buff) == _HTM_TBEGIN_STARTED)
@{
/* Transaction State Initiated. */
if (is_locked (lock))
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b055f3a0d34..930f14b730c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,15 @@
+2015-04-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56674
+ PR fortran/58813
+ PR fortran/59016
+ PR fortran/59024
+ * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
+ former to the latter and make it non-static. Update callers.
+ * gfortran.h (gfc_save_symbol_data): New prototype.
+ * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
+ before modifying symbols 'sym' and 'dt_sym'.
+
2015-03-21 Mikael Morin <mikael@gcc.gnu.org>
Backport from trunk:
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 9292418adca..e73e32d20cf 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -2852,6 +2852,7 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
return MATCH_ERROR;
}
+ gfc_save_symbol_data (sym);
gfc_set_sym_referenced (sym);
if (!sym->attr.generic
&& gfc_add_generic (&sym->attr, sym->name, NULL) == FAILURE)
@@ -2876,6 +2877,8 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int implicit_flag)
sym->generic = intr;
sym->attr.if_source = IFSRC_DECL;
}
+ else
+ gfc_save_symbol_data (dt_sym);
gfc_set_sym_referenced (dt_sym);
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index bd1aeb9ffab..2428b519b20 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -2638,6 +2638,7 @@ gfc_try verify_bind_c_derived_type (gfc_symbol *);
gfc_try verify_com_block_vars_c_interop (gfc_common_head *);
void generate_isocbinding_symbol (const char *, iso_c_binding_symbol, const char *);
gfc_symbol *get_iso_c_sym (gfc_symbol *, char *, const char *, int);
+void gfc_save_symbol_data (gfc_symbol *);
int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **, bool);
int gfc_get_ha_symbol (const char *, gfc_symbol **);
int gfc_get_ha_sym_tree (const char *, gfc_symtree **);
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 1b3702f821f..785f58200c2 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2717,8 +2717,8 @@ single_undo_checkpoint_p (void)
/* Save symbol with the information necessary to back it out. */
-static void
-save_symbol_data (gfc_symbol *sym)
+void
+gfc_save_symbol_data (gfc_symbol *sym)
{
gfc_symbol *s;
unsigned i;
@@ -2813,7 +2813,7 @@ gfc_get_sym_tree (const char *name, gfc_namespace *ns, gfc_symtree **result,
p->mark = 1;
/* Copy in case this symbol is changed. */
- save_symbol_data (p);
+ gfc_save_symbol_data (p);
}
*result = st;
@@ -2852,7 +2852,7 @@ gfc_get_ha_sym_tree (const char *name, gfc_symtree **result)
if (st != NULL)
{
- save_symbol_data (st->n.sym);
+ gfc_save_symbol_data (st->n.sym);
*result = st;
return i;
}
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 53439333c90..1a27df2e14c 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -831,9 +831,19 @@ evaluate_conditions_for_known_args (struct cgraph_node *node,
}
if (c->code == IS_NOT_CONSTANT || c->code == CHANGED)
continue;
- res = fold_binary_to_constant (c->code, boolean_type_node, val, c->val);
- if (res && integer_zerop (res))
- continue;
+
+ if (operand_equal_p (TYPE_SIZE (TREE_TYPE (c->val)),
+ TYPE_SIZE (TREE_TYPE (val)), 0))
+ {
+ val = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (c->val), val);
+
+ res = val
+ ? fold_binary_to_constant (c->code, boolean_type_node, val, c->val)
+ : NULL;
+
+ if (res && integer_zerop (res))
+ continue;
+ }
clause |= 1 << (i + predicate_first_dynamic_condition);
}
return clause;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cf8b0bd47d0..dde3fb3e441 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,172 @@
+2015-05-05 Shanyao chen <chenshanyao@huawei.com>
+
+ Backported from mainline
+ 2015-01-19 Jiong Wang <jiong.wang@arm.com>
+
+ * gcc.target/aarch64/pr64304.c: New testcase.
+
+2015-05-05 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline.
+ 2015-04-27 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/64579
+ * gcc.target/powerpc/htm-1.c: New test.
+ * gcc.target/powerpc/htm-builtin-1.c (__builtin_tabortdc): Only test
+ on 64-bit compiles.
+ (__builtin_tabortdci): Likewise.
+ (__builtin_tcheck): Remove operand.
+ * lib/target-supports.exp (check_htm_hw_available): New function.
+
+2015-04-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222664
+ 2015-04-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-2.c: Replace powerpc_vsx_ok
+ with powerpc_p8vector_ok.
+
+2015-04-30 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/ipa/pr63551.C: New test.
+
+ Backported from mainline
+ 2014-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/63551
+ * gcc.dg/ipa/pr63551.c (fn2): Use 4294967286U instead of
+ 4294967286 to avoid warnings.
+
+ 2014-12-01 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/63551
+ * gcc.dg/ipa/pr63551.c: New test.
+ * gcc.dg/ipa/pr64041.c: Likewise.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222362
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-2.c: New.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222351
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/swaps-p8-18.c: New test.
+
+2015-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222349
+ 2015-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65456
+ * gcc.dg/vect/bb-slp-24.c: Exclude test for POWER8.
+ * gcc.dg/vect/bb-slp-25.c: Likewise.
+ * gcc.dg/vect/bb-slp-29.c: Likewise.
+ * gcc.dg/vect/bb-slp-9.c: Replace vect_no_align with
+ vect_no_align && { ! vect_hw_misalign }.
+ * gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c: Exclude test for
+ vect_hw_misalign.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Likewise.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust tests to
+ account for POWER8, where peeling for alignment is not needed.
+ * gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Replace
+ vect_no_align with vect_no_align && { ! vect_hw_misalign }.
+ * gcc.dg.vect.if-cvt-stores-vect-ifcvt-18.c: Likewise.
+ * gcc.dg/vect/no-scevccp-outer-6-global.c: Likewise.
+ * gcc.dg/vect/no-scevccp-outer-6.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-43.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-57.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-61.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
+ * gcc.dg/vect/pr16105.c: Likewise.
+ * gcc.dg/vect/pr20122.c: Likewise.
+ * gcc.dg/vect/pr33804.c: Likewise.
+ * gcc.dg/vect/pr33953.c: Likewise.
+ * gcc.dg/vect/slp-25.c: Likewise.
+ * gcc.dg/vect/vect-105-bit-array.c: Likewise.
+ * gcc.dg/vect/vect-105.c: Likewise.
+ * gcc.dg/vect/vect-27.c: Likewise.
+ * gcc.dg/vect/vect-29.c: Likewise.
+ * gcc.dg/vect/vect-33.c: Exclude unaligned access test for
+ POWER8.
+ * gcc.dg/vect/vect-42.c: Replace vect_no_align with vect_no_align
+ && { ! vect_hw_misalign }.
+ * gcc.dg/vect/vect-44.c: Likewise.
+ * gcc.dg/vect/vect-48.c: Likewise.
+ * gcc.dg/vect/vect-50.c: Likewise.
+ * gcc.dg/vect/vect-52.c: Likewise.
+ * gcc.dg/vect/vect-56.c: Likewise.
+ * gcc.dg/vect/vect-60.c: Likewise.
+ * gcc.dg/vect/vect-72.c: Likewise.
+ * gcc.dg/vect/vect-75-big-array.c: Likewise.
+ * gcc.dg/vect/vect-75.c: Likewise.
+ * gcc.dg/vect/vect-77-alignchecks.c: Likewise.
+ * gcc.dg/vect/vect-77-global.c: Likewise.
+ * gcc.dg/vect/vect-78-alignchecks.c: Likewise.
+ * gcc.dg/vect/vect-78-global.c: Likewise.
+ * gcc.dg/vect/vect-93.c: Likewise.
+ * gcc.dg/vect/vect-95.c: Likewise.
+ * gcc.dg/vect/vect-96.c: Likewise.
+ * gcc.dg/vect/vect-cond-1.c: Likewise.
+ * gcc.dg/vect/vect-cond-3.c: Likewise.
+ * gcc.dg/vect/vect-cond-4.c: Likewise.
+ * gcc.dg/vect/vect-cselim-1.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-1.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-3.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-4.c: Likewise.
+ * gcc.dg/vect/vect-multitypes-6.c: Likewise.
+ * gcc.dg/vect/vect-nest-cycle-1.c: Likewise.
+ * gcc.dg/vect/vect-nest-cycle-2.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a.c: Likewise.
+ * gcc.dg/vect/vect-outer-5.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-lb-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir-lb.c: Likewise.
+ * gcc.dg/vect/vect-outer-fir.c: Likewise.
+ * gcc.dg/vect/vect-peel-3.c: Likewise.
+ * gcc.dg/vect/vect-peel-4.c: Likewise.
+ * gcc.dg/vect/vect-pre-interact.c: Likewise.
+ * gcc.target/powerpc/pr65456.c: New test.
+ * gcc.target/powerpc/vsx-vectorize-2.c: Exclude test for POWER8.
+ * gcc.target/powerpc/vsx-vectorize-4.c: Likewise.
+ * gcc.target/powerpc/vsx-vectorize-6.c: Likewise.
+ * gcc.target/powerpc/vsx-vectorize-7.c: Likewise.
+ * gfortran.dg/vect/vect-2.f90: Replace vect_no_align with
+ vect_no_align && { ! vect_hw_misalign }.
+ * gfortran.dg/vect/vect-3.f90: Likewise.
+ * gfortran.dg/vect/vect-4.f90: Likewise.
+ * gfortran.dg/vect/vect-5.f90: Likewise.
+ * lib/target-supports.exp (check_effective_target_vect_no_align):
+ Return 1 for POWER8.
+ (check_effective_target_vect_hw_misalign): Return 1 for POWER8.
+
+ Backport from mainline r222372
+ 2015-04-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c: Replace
+ vect_no_align with vect_no_align && { ! vect_hw_misalign }.
+
+2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backport from mainline r222205
+ 2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/65787
+ * gcc.target/powerpc/pr65787.c: New.
+
+2015-04-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56674
+ PR fortran/58813
+ PR fortran/59016
+ PR fortran/59024
+ * gfortran.dg/used_types_27.f90: New.
+
2015-03-31 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.target/s390/hotpatch-25.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C
new file mode 100644
index 00000000000..51bf0ec3352
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype2.C
@@ -0,0 +1,25 @@
+// PR c++/65727
+// { dg-do compile { target c++11 } }
+
+struct type_a { void(*cb)(); };
+
+struct type_b
+{
+ type_b(type_a p);
+ void dummy();
+};
+
+template<class T>
+constexpr T function_c(T**t) {return **t;}
+
+class type_d {
+ public:
+ static void dummy();
+};
+class type_e {
+ public:
+ static type_b b;
+ type_d *d[1];
+};
+
+type_b type_e::b = {{[](){decltype(function_c(type_e::d))::dummy();}}};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
index 8ff36478d53..8d32fac0a6c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
@@ -3,7 +3,7 @@
class Klass
{
- unsigned int local;
+ unsigned int local; // { dg-message "" }
public:
bool dostuff();
};
@@ -11,7 +11,7 @@ public:
bool Klass::dostuff()
{
auto f = []() -> bool {
- if (local & 1) { return true; } // { dg-error "not captured" }
+ if (local & 1) { return true; } // { dg-error "" }
return false;
};
}
diff --git a/gcc/testsuite/g++.dg/ipa/pr63551.C b/gcc/testsuite/g++.dg/ipa/pr63551.C
new file mode 100644
index 00000000000..03e03397969
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr63551.C
@@ -0,0 +1,23 @@
+// { dg-options "-O -Wno-psabi" }
+// { dg-do compile }
+
+struct A { int a; };
+template <typename T, typename V> struct B { V operator[] (T); };
+union U { long double ld; void *v; };
+A a;
+
+void
+bar (U &x)
+{
+ if (x.v) *reinterpret_cast <A *>(x.v) = a;
+}
+
+struct C { C (A) { c.ld = 0; bar (c); } U c; };
+struct D { A d, e; void foo () { f[0][d] = e; } B <int, B <A, C> > f; };
+
+void
+baz ()
+{
+ D d;
+ d.foo ();
+}
diff --git a/gcc/testsuite/g++.dg/lookup/using55.C b/gcc/testsuite/g++.dg/lookup/using55.C
new file mode 100644
index 00000000000..61098b186fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/using55.C
@@ -0,0 +1,19 @@
+// PR c++/65721
+
+template<typename T>
+struct A {
+ typedef T D;
+};
+
+template<typename X>
+class B : public A<X> {
+ using typename B::D; // { dg-error "not a base" }
+public:
+ D echo(D x) { // { dg-error "D" }
+ return x;
+ }
+};
+
+int main() {
+ B<int> b;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr63551.c b/gcc/testsuite/gcc.dg/ipa/pr63551.c
new file mode 100644
index 00000000000..48b020aee40
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr63551.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+
+union U
+{
+ unsigned int f0;
+ int f1;
+};
+
+int a, d;
+
+void
+fn1 (union U p)
+{
+ if (p.f1 <= 0)
+ if (a)
+ d = 0;
+}
+
+void
+fn2 ()
+{
+ d = 0;
+ union U b = { 4294967286U };
+ fn1 (b);
+}
+
+int
+main ()
+{
+ fn2 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr64041.c b/gcc/testsuite/gcc.dg/ipa/pr64041.c
new file mode 100644
index 00000000000..4877b4b68a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr64041.c
@@ -0,0 +1,64 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+int printf (const char *, ...);
+
+int a, b = 1, d;
+
+union U1
+{
+ unsigned int f0;
+ int f1;
+};
+
+union U2
+{
+ int f2;
+ int f3;
+} c;
+
+int
+fn1 (int p)
+{
+ int t = p && a || p && a && p;
+ return t ? t : a;
+}
+
+unsigned
+fn2 (union U1 p1, union U2 p2)
+{
+ if (p1.f1 <= 0)
+ {
+ for (; p2.f2;)
+ c.f2 = 0;
+ p2.f2 = fn1 (d);
+ }
+ return p2.f3;
+}
+
+int g = 0;
+
+int
+foo ()
+{
+ if (b)
+ {
+ union U1 f = { 0xFFFFFFFFU };
+
+ fn2 (f, c);
+ }
+ g = 1;
+ return 0;
+}
+
+
+int
+main ()
+{
+ foo ();
+
+ if (g == 0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-24.c b/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
index cbe1cb3edea..1e91d0826b2 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
@@ -54,6 +54,8 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_element_align && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-25.c b/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
index 193ab9d4db3..5d98cd318cd 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
@@ -54,6 +54,8 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_element_align && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-29.c b/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
index e37b96d14d9..65bc5fee6e3 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
@@ -54,6 +54,8 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && vect_element_align } } } } */
+/* Exclude POWER8 (only POWER cpu for which vect_element_align is true)
+ because loops have vectorized before SLP gets a shot. */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { { vect_int_mult && vect_element_align } && { ! powerpc*-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-9.c b/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
index 5535dee0641..dfe90ad91e2 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
@@ -46,6 +46,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c
index 4e8d71b9673..29630d5547f 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c
@@ -41,6 +41,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
index 9cae12fdbb3..9bc3ea55c30 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
@@ -41,5 +41,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
index 272b3f0d733..161497faf68 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
@@ -47,5 +47,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
index d716b613946..2d1ee97c398 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
@@ -43,8 +43,8 @@ int main (void)
}
/* Peeling to align the store is used. Overhead of peeling is too high. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target vector_alignment_reachable } } } */
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_hw_misalign} } } } } */
/* Versioning to align the store is used. Overhead of versioning is not too high. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c
index efab0469bd3..5123950806d 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c
@@ -67,5 +67,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c b/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c
index 38906a94af2..cdf687ab420 100644
--- a/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c
+++ b/gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c
@@ -65,5 +65,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || { ! vect_strided2 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c
index 9447524e817..4aa4a5e98c2 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c
@@ -52,5 +52,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c
index 70cf520d950..187a78c3744 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c
@@ -51,6 +51,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { unaligned_stack || vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { xfail { unaligned_stack || { vect_no_align && { ! vect_hw_misalign } } } } } } */
/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
index 16a01d1a320..d09cd41447b 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
@@ -90,5 +90,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c
index 63d332a39b2..fd4288c9d29 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c
@@ -71,5 +71,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c
index 2df45fdfe85..8b1b6c6d8fb 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c
@@ -73,5 +73,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
index 5679ff765c1..2be160426e2 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
@@ -50,7 +50,7 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr16105.c b/gcc/testsuite/gcc.dg/vect/pr16105.c
index c59fe05730f..50c16c468f7 100644
--- a/gcc/testsuite/gcc.dg/vect/pr16105.c
+++ b/gcc/testsuite/gcc.dg/vect/pr16105.c
@@ -18,5 +18,5 @@ void square(const float * __restrict__ a,
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr20122.c b/gcc/testsuite/gcc.dg/vect/pr20122.c
index 9d21fc60062..c9c523c5d12 100644
--- a/gcc/testsuite/gcc.dg/vect/pr20122.c
+++ b/gcc/testsuite/gcc.dg/vect/pr20122.c
@@ -52,5 +52,5 @@ int main (int argc, char **argv)
/* The loops in VecBug and VecBug2 require versioning for alignment.
The loop in main is aligned. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr33804.c b/gcc/testsuite/gcc.dg/vect/pr33804.c
index a4fb3868397..c7f3b6fa556 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33804.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33804.c
@@ -11,6 +11,6 @@ void f(unsigned char *s, unsigned char *d, int n) {
}
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr33953.c b/gcc/testsuite/gcc.dg/vect/pr33953.c
index f501a452e53..3a882692dcb 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33953.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33953.c
@@ -28,8 +28,8 @@ void blockmove_NtoN_blend_noremap32 (const UINT32 *srcdata, int srcwidth,
}
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-25.c b/gcc/testsuite/gcc.dg/vect/slp-25.c
index e5e5e3bdfa6..d69be28da4f 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-25.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-25.c
@@ -56,5 +56,5 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { ! vect_natural_alignment } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_natural_alignment } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c
index f99a2afd728..0a4746e2edb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-105-big-array.c
@@ -100,7 +100,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-105.c b/gcc/testsuite/gcc.dg/vect/vect-105.c
index bbf42af897f..79d31c168a4 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-105.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-105.c
@@ -66,7 +66,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "possible dependence between data-refs" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-27.c b/gcc/testsuite/gcc.dg/vect/vect-27.c
index 4a2da227e3c..36c23fa5cc6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-27.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-27.c
@@ -43,8 +43,8 @@ int main (void)
}
/* The initialization induction loop (with aligned access) is also vectorized. */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-29.c b/gcc/testsuite/gcc.dg/vect/vect-29.c
index 0ad28488056..6e62ee969bc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-29.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-29.c
@@ -50,7 +50,7 @@ int main (void)
/* The initialization induction loop (with aligned access) is also vectorized. */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-33.c b/gcc/testsuite/gcc.dg/vect/vect-33.c
index 43daaa80704..d4126afb9ae 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-33.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-33.c
@@ -38,7 +38,7 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! vect_hw_misalign } } } } */
/* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target vector_alignment_reachable } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c
index 31810817b46..6781ece182d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-42.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-42.c
@@ -64,7 +64,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c
index ef1a4635bfa..70f28dba315 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-44.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-44.c
@@ -65,8 +65,8 @@ int main (void)
two loads to be aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {{! vect_no_align} && {! vect_hw_misalign} } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c
index d2eed3a6b97..5da97372d77 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-48.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-48.c
@@ -55,7 +55,7 @@ int main (void)
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c
index 068c804a168..98ccf9a891f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-50.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-50.c
@@ -61,9 +61,9 @@ int main (void)
align the store will not force the two loads to be aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_hw_misalign } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && { {! vect_no_align } && {! vect_hw_misalign } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c
index 69c097966ed..c7cf6abbf60 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-52.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-52.c
@@ -56,7 +56,7 @@ int main (void)
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c
index 5a8130b11e2..ced829e4837 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-56.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-56.c
@@ -67,7 +67,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { vect_element_align } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c
index 838a9bca417..8cfb8d9552b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-60.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-60.c
@@ -68,7 +68,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { vect_element_align } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-72.c b/gcc/testsuite/gcc.dg/vect/vect-72.c
index 67a19751952..5d231782874 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-72.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-72.c
@@ -45,7 +45,7 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
index 1c70cc2c518..3524fa9a253 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
@@ -52,6 +52,6 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75.c b/gcc/testsuite/gcc.dg/vect/vect-75.c
index 092a3013e07..35336b93953 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75.c
@@ -44,6 +44,6 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
index 4a05874b67e..56a2197d82b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
@@ -49,8 +49,8 @@ int main (void)
both for the load and the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && vect_no_align } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align} } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align } } } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-global.c b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
index ac29d7d3c44..6236caf131d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
@@ -47,7 +47,7 @@ int main (void)
/* Requires versioning for aliasing. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
index 71c01ae1ce7..d4207074a07 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
@@ -50,8 +50,8 @@ int main (void)
both for the load and the store. */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && vect_no_align } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align} } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && { ! vect_no_align } } } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-global.c b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
index ec6520fd8a0..22065bf10df 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
@@ -47,7 +47,7 @@ int main (void)
(The store is aligned). */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-93.c b/gcc/testsuite/gcc.dg/vect/vect-93.c
index 65403eb72fc..52ba1ca4e7c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-93.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-93.c
@@ -76,10 +76,10 @@ int main (void)
/* in main1: */
/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target !powerpc*-*-* !i?86-*-* !x86_64-*-* } } } */
-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* in main: */
-/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-95.c b/gcc/testsuite/gcc.dg/vect/vect-95.c
index c03d1965df1..be560a6c316 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-95.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-95.c
@@ -64,6 +64,6 @@ int main (void)
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align || vect_element_align} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 4 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-96.c b/gcc/testsuite/gcc.dg/vect/vect-96.c
index 0060d4eb4bf..7d8c92a5489 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-96.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-96.c
@@ -46,5 +46,5 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-1.c b/gcc/testsuite/gcc.dg/vect/vect-cond-1.c
index e42752f97a4..bd2d2fb6247 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-1.c
@@ -51,7 +51,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-3.c b/gcc/testsuite/gcc.dg/vect/vect-cond-3.c
index 32ebf0fff4f..0f36e848b55 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-3.c
@@ -59,7 +59,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-4.c b/gcc/testsuite/gcc.dg/vect/vect-cond-4.c
index 3c37c68250d..9a6e117d912 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-4.c
@@ -56,7 +56,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c b/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c
index 3c21918efb7..ce2db7d8b5d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cselim-1.c
@@ -82,5 +82,5 @@ main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align || { ! vect_strided2 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vect_strided2 } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
index 7ab21f1df6e..7fbfa3c7af5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
@@ -80,8 +80,8 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align } || {vect_sizes_32B_16B }}} } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align } || {vect_sizes_32B_16B }}} } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail {{ vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B }}} } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
index 93796d0cec3..2fdd4b7c9e5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
@@ -54,7 +54,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
index ed6ac6eda6b..44891af5232 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
@@ -91,7 +91,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { vect_element_align} } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { xfail { vect_no_align || vect_element_align } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
index 7f72785069a..a337ca4b649 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
@@ -61,7 +61,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { sparc*-*-* && ilp32 } }} } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" {xfail { vect_no_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c b/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c
index 84883ca191e..588751e85cb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c
@@ -43,6 +43,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c b/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c
index 22b1d98de4b..247d3272e8b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c
@@ -42,6 +42,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
index c6486db691b..532d9b3d958 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
@@ -48,7 +48,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
index 3d6e1076e79..d1382cc1e26 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
@@ -48,7 +48,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
index 2d37d6d148e..f0cdcaebe85 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-5.c
@@ -78,5 +78,5 @@ int main ()
is known. */
/* { dg-final { scan-tree-dump-times "not vectorized: possible dependence between data-refs" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump "zero step in outer loop." "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c
index c69b7d74950..07db614484a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c
@@ -70,5 +70,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c
index 5ac62ac3a2f..505eef58f17 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c
@@ -74,5 +74,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c
index 3c1a362c003..c1732d9fbca 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c
@@ -74,5 +74,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c b/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c
index af787b96a33..fa10263558f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-fir.c
@@ -70,5 +70,5 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
index 5aab8053ed6..312947afc45 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
@@ -47,7 +47,7 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {vect_sizes_32B_16B } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
index dffb858e2b2..53871c8833f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
@@ -44,7 +44,7 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c b/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c
index 096839f9c2d..8b7a72ba7e6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-pre-interact.c
@@ -12,5 +12,5 @@ void foo (void)
res[i] = data[i] + data[i + 1];
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr64304.c b/gcc/testsuite/gcc.target/aarch64/pr64304.c
new file mode 100644
index 00000000000..721b6b95805
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr64304.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 --save-temps" } */
+
+unsigned char byte = 0;
+
+void
+set_bit (unsigned int bit, unsigned char value)
+{
+ unsigned char mask = (unsigned char) (1 << (bit & 7));
+
+ if (! value)
+ byte &= (unsigned char)~mask;
+ else
+ byte |= mask;
+ /* { dg-final { scan-assembler "and\tw\[0-9\]+, w\[0-9\]+, 7" } } */
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
new file mode 100644
index 00000000000..0533f4544d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-2.c
@@ -0,0 +1,36 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-O2 -mcpu=power8 -mno-crypto" } */
+
+void use_builtins_d (__vector unsigned long long *p, __vector unsigned long long *q, __vector unsigned long long *r, __vector unsigned long long *s)
+{
+ p[0] = __builtin_crypto_vcipher (q[0], r[0]); /* { dg-error "Builtin function __builtin_crypto_vcipher is not supported with the current options" } */
+ p[1] = __builtin_crypto_vcipherlast (q[1], r[1]); /* { dg-error "Builtin function __builtin_crypto_vcipherlast is not supported with the current options" } */
+ p[2] = __builtin_crypto_vncipher (q[2], r[2]); /* { dg-error "Builtin function __builtin_crypto_vncipher is not supported with the current options" } */
+ p[3] = __builtin_crypto_vncipherlast (q[3], r[3]); /* { dg-error "Builtin function __builtin_crypto_vncipherlast is not supported with the current options" } */
+ p[4] = __builtin_crypto_vpermxor (q[4], r[4], s[4]);
+ p[5] = __builtin_crypto_vpmsumd (q[5], r[5]);
+ p[6] = __builtin_crypto_vshasigmad (q[6], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmad is not supported with the current options" } */
+ p[7] = __builtin_crypto_vsbox (q[7]); /* { dg-error "Builtin function __builtin_crypto_vsbox is not supported with the current options" } */
+}
+
+void use_builtins_w (__vector unsigned int *p, __vector unsigned int *q, __vector unsigned int *r, __vector unsigned int *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumw (q[1], r[1]);
+ p[2] = __builtin_crypto_vshasigmaw (q[2], 1, 15); /* { dg-error "Builtin function __builtin_crypto_vshasigmaw is not supported with the current options" } */
+}
+
+void use_builtins_h (__vector unsigned short *p, __vector unsigned short *q, __vector unsigned short *r, __vector unsigned short *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumh (q[1], r[1]);
+}
+
+void use_builtins_b (__vector unsigned char *p, __vector unsigned char *q, __vector unsigned char *r, __vector unsigned char *s)
+{
+ p[0] = __builtin_crypto_vpermxor (q[0], r[0], s[0]);
+ p[1] = __builtin_crypto_vpmsumb (q[1], r[1]);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-1.c b/gcc/testsuite/gcc.target/powerpc/htm-1.c
new file mode 100644
index 00000000000..f27e32ca281
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/htm-1.c
@@ -0,0 +1,52 @@
+/* { dg-do run { target { powerpc*-*-* && htm_hw } } } */
+/* { dg-require-effective-target powerpc_htm_ok } */
+/* { dg-options "-mhtm" } */
+
+/* Program to test PowerPC HTM instructions. */
+
+#include <stdlib.h>
+#include <htmintrin.h>
+
+int
+main (void)
+{
+ long i;
+ unsigned long mask = 0;
+
+repeat:
+ if (__builtin_tbegin (0))
+ {
+ mask++;
+ }
+ else
+ abort();
+
+ if (mask == 1)
+ {
+ __builtin_tsuspend ();
+
+ if (_HTM_STATE (__builtin_tcheck ()) != _HTM_SUSPENDED)
+ abort ();
+
+ __builtin_tresume ();
+
+ if (_HTM_STATE (__builtin_tcheck ()) != _HTM_TRANSACTIONAL)
+ abort ();
+ }
+ else
+ mask++;
+
+ if (_HTM_STATE (__builtin_tendall ()) != _HTM_TRANSACTIONAL)
+ abort ();
+
+ if (mask == 1)
+ goto repeat;
+
+ if (_HTM_STATE (__builtin_tendall ()) != _HTM_NONTRANSACTIONAL)
+ abort ();
+
+ if (mask != 3)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
index 3e4b72919e9..b232580a20b 100644
--- a/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
@@ -6,8 +6,8 @@
/* { dg-final { scan-assembler-times "tbegin\\." 1 } } */
/* { dg-final { scan-assembler-times "tend\\." 2 } } */
/* { dg-final { scan-assembler-times "tabort\\." 2 } } */
-/* { dg-final { scan-assembler-times "tabortdc\\." 1 } } */
-/* { dg-final { scan-assembler-times "tabortdci\\." 1 } } */
+/* { dg-final { scan-assembler-times "tabortdc\\." 1 { target lp64 } } } */
+/* { dg-final { scan-assembler-times "tabortdci\\." 1 { target lp64 } } } */
/* { dg-final { scan-assembler-times "tabortwc\\." 1 } } */
/* { dg-final { scan-assembler-times "tabortwci\\." 2 } } */
/* { dg-final { scan-assembler-times "tcheck" 1 } } */
@@ -25,12 +25,14 @@ void use_builtins (long *p, char code, long *a, long *b)
p[3] = __builtin_tabort (0);
p[4] = __builtin_tabort (code);
+#ifdef __powerpc64__
p[5] = __builtin_tabortdc (0xf, a[5], b[5]);
p[6] = __builtin_tabortdci (0xf, a[6], 13);
+#endif
p[7] = __builtin_tabortwc (0xf, a[7], b[7]);
p[8] = __builtin_tabortwci (0xf, a[8], 13);
- p[9] = __builtin_tcheck (5);
+ p[9] = __builtin_tcheck ();
p[10] = __builtin_trechkpt ();
p[11] = __builtin_treclaim (0);
p[12] = __builtin_tresume ();
diff --git a/gcc/testsuite/gcc.target/powerpc/pr65456.c b/gcc/testsuite/gcc.target/powerpc/pr65456.c
new file mode 100644
index 00000000000..5a645c76f96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr65456.c
@@ -0,0 +1,65 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc64le-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+/* Verify that swap optimization properly removes swaps for unaligned
+ vector stores. See PR65456. */
+
+typedef unsigned char UChar;
+typedef unsigned short UShort;
+typedef unsigned int UWord;
+
+typedef unsigned long SizeT;
+typedef unsigned long Addr;
+
+void *memmove(void *dst, const void *src, SizeT len)
+{
+ const Addr WS = sizeof(UWord);/* 8 or 4 */
+ const Addr WM = WS - 1;/* 7 or 3 */
+
+ /* Copying backwards. */
+ SizeT n = len;
+ Addr d = (Addr) dst;
+ Addr s = (Addr) src;
+
+ if (((s ^ d) & WM) == 0) {
+ /* s and d have same UWord alignment. */
+ /* Pull up to a UWord boundary. */
+ while ((s & WM) != 0 && n >= 1) {
+ *(UChar *) d = *(UChar *) s;
+ s += 1;
+ d += 1;
+ n -= 1;
+ }
+ /* Copy UWords. */
+ while (n >= WS) {
+ *(UWord *) d = *(UWord *) s;
+ s += WS;
+ d += WS;
+ n -= WS;
+ }
+ if (n == 0)
+ return dst;
+ }
+ if (((s | d) & 1) == 0) {
+ /* Both are 16-aligned; copy what we can thusly. */
+ while (n >= 2) {
+ *(UShort *) d = *(UShort *) s;
+ s += 2;
+ d += 2;
+ n -= 2;
+ }
+ }
+ /* Copy leftovers, or everything if misaligned. */
+ while (n >= 1) {
+ *(UChar *) d = *(UChar *) s;
+ s += 1;
+ d += 1;
+ n -= 1;
+ }
+
+ return dst;
+}
+
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+/* { dg-final { scan-assembler-not "xxswapd" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr65787.c b/gcc/testsuite/gcc.target/powerpc/pr65787.c
new file mode 100644
index 00000000000..c819be9a707
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr65787.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler "xxsldwi \[0-9\]*,\[0-9\]*,\[0-9\]*,3" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+/* This test verifies that a vector extract operand properly has its
+ lane changed by the swap optimization. Element 2 of LE corresponds
+ to element 1 of BE. When doublewords are swapped, this becomes
+ element 3 of BE, so we need to shift the vector left by 3 words
+ to be able to extract the correct value from BE element zero. */
+
+typedef float v4f32 __attribute__ ((__vector_size__ (16)));
+
+void foo (float);
+extern v4f32 x, y;
+
+int main() {
+ v4f32 z = x + y;
+ foo (z[2]);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c b/gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c
new file mode 100644
index 00000000000..c55f527d420
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/swaps-p8-18.c
@@ -0,0 +1,35 @@
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
+/* { dg-options "-mcpu=power8 -O3" } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+
+/* This is a test for a specific convert-splat permute removal. */
+
+void compute (float*, float*, float*, int, int);
+double test (void);
+double gorp;
+
+int main (void)
+{
+ float X[10000], Y[256], Z[2000];
+ int i;
+ for (i = 0; i < 2500; i++)
+ compute (X, Y, Z, 256, 2000);
+ gorp = test ();
+}
+
+void compute(float *X, float *Y, float *Z, int m, int n)
+{
+ int i, j;
+ float w, *x, *y;
+
+ for (i = 0; i < n; i++)
+ {
+ w = 0.0;
+ x = X++;
+ y = Y;
+ for (j = 0; j < m; j++)
+ w += (*x++) * (*y++);
+ Z[i] = w;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c
index 7bb7db0fa5f..c17fe28ec87 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c
@@ -58,7 +58,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c
index ad6f8f0fec5..952a68e58b8 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c
@@ -54,7 +54,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c
index 8e6e288b9bf..1538cc1a421 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c
@@ -58,7 +58,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c
index c09583535e1..a45233b8e05 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c
@@ -58,7 +58,7 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail {! vect_hw_misalign } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" {xfail { {! vect_hw_misalign } || powerpc*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gfortran.dg/used_types_27.f90 b/gcc/testsuite/gfortran.dg/used_types_27.f90
new file mode 100644
index 00000000000..4797f855cac
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/used_types_27.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR fortran/56674
+! PR fortran/58813
+! PR fortran/59016
+! PR fortran/59024
+! The generic name 'atomic_kind_types' was keeping pointers to freed
+! symbols, leading to random error-recovery ICEs.
+!
+! Original test case from Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>.
+
+MODULE atomic_kind_types
+ PUBLIC :: atomic_kind_type
+CONTAINS
+ INTEGER FUNCTION is_hydrogen(atomic_kind)
+ TYPE(atomic_kind_type), pointer :: atomic_kind ! { dg-error "used before it is defined" }
+ END FUNCTION
+END MODULE
diff --git a/gcc/testsuite/gfortran.dg/vect/pr32380.f b/gcc/testsuite/gfortran.dg/vect/pr32380.f
index b7593807fa5..33c4eecdf58 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr32380.f
+++ b/gcc/testsuite/gfortran.dg/vect/pr32380.f
@@ -259,5 +259,5 @@ c
return
end
-! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { xfail powerpc*-*-* ia64-*-*-* } } }
+! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { xfail { { powerpc*-*-* && { ! vect_hw_misalign } } || ia64-*-*-* } } } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-2.f90 b/gcc/testsuite/gfortran.dg/vect/vect-2.f90
index 0f45a70c53b..b4358c81430 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-2.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-2.f90
@@ -15,8 +15,8 @@ END
! support unaligned loads).
! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { vect_no_align || { ! vector_alignment_reachable } } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_no_align && { ! vector_alignment_reachable } } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { vect_no_align || { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vector_alignment_reachable } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } && { ! vector_alignment_reachable } } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target { { vect_no_align && { ! vect_hw_misalign } } || { { ! vector_alignment_reachable } && { ! vect_hw_misalign } } } } } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-3.f90 b/gcc/testsuite/gfortran.dg/vect/vect-3.f90
index 5fc4fbf49e3..d70c6b4d1c1 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-3.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-3.f90
@@ -6,10 +6,10 @@ DIMENSION X(N), Y(N)
Y = Y + A * X
END
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target vect_no_align } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } }
! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vect_no_align} && { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vect_no_align} && { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable}} } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || { ! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable}} } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || { ! vector_alignment_reachable} } } } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-4.f90 b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
index 592282fb09b..0d29852704f 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-4.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
@@ -10,8 +10,8 @@ Y = Y + A * X
END
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || {! vector_alignment_reachable} } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }
! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-5.f90 b/gcc/testsuite/gfortran.dg/vect/vect-5.f90
index 72776a6fb49..77ef77b09b6 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-5.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-5.f90
@@ -36,8 +36,8 @@
end
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } }
-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align } } } }
-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } }
+! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } }
+! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } }
! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index e593647c840..d5c8f8d9d6a 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2808,6 +2808,25 @@ proc check_effective_target_powerpc_htm_ok { } {
}
}
+# Return 1 if the target supports executing HTM hardware instructions,
+# 0 otherwise. Cache the result.
+
+proc check_htm_hw_available { } {
+ return [check_cached_effective_target htm_hw_available {
+ # For now, disable on Darwin
+ if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} {
+ expr 0
+ } else {
+ check_runtime_nocache htm_hw_available {
+ int main()
+ {
+ __builtin_ttest ();
+ return 0;
+ }
+ } "-mhtm"
+ }
+ }]
+}
# Return 1 if this is a PowerPC target supporting -mcpu=cell.
proc check_effective_target_powerpc_ppu_ok { } {
@@ -3674,6 +3693,7 @@ proc check_effective_target_vect_no_align { } {
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm_vect_no_misalign]
+ || ([istarget powerpc*-*-*] && [check_p8vector_hw_available])
|| ([istarget mips*-*-*]
&& [check_effective_target_mips_loongson]) } {
set et_vect_no_align_saved 1
@@ -3695,8 +3715,9 @@ proc check_effective_target_vect_hw_misalign { } {
} else {
set et_vect_hw_misalign_saved 0
if { ([istarget x86_64-*-*]
- || [istarget aarch64*-*-*]
- || [istarget i?86-*-*]) } {
+ || ([istarget powerpc*-*-*] && [check_p8vector_hw_available])
+ || [istarget aarch64*-*-*]
+ || [istarget i?86-*-*]) } {
set et_vect_hw_misalign_saved 1
}
}
@@ -4627,6 +4648,7 @@ proc is-effective-target { arg } {
"p8vector_hw" { set selected [check_p8vector_hw_available] }
"ppc_recip_hw" { set selected [check_ppc_recip_hw_available] }
"dfp_hw" { set selected [check_dfp_hw_available] }
+ "htm_hw" { set selected [check_htm_hw_available] }
"named_sections" { set selected [check_named_sections_available] }
"gc_sections" { set selected [check_gc_sections_available] }
"cxa_atexit" { set selected [check_cxa_atexit_available] }
@@ -4650,6 +4672,7 @@ proc is-effective-target-keyword { arg } {
"p8vector_hw" { return 1 }
"ppc_recip_hw" { return 1 }
"dfp_hw" { return 1 }
+ "htm_hw" { return 1 }
"named_sections" { return 1 }
"gc_sections" { return 1 }
"cxa_atexit" { return 1 }
@@ -5207,7 +5230,7 @@ proc check_vect_support_and_set_flags { } {
lappend DEFAULT_VECTCFLAGS "-maltivec"
if [check_p8vector_hw_available] {
- lappend DEFAULT_VECTCFLAGS "-mpower8-vector" "-mno-allow-movmisalign"
+ lappend DEFAULT_VECTCFLAGS "-mpower8-vector"
} elseif [check_vsx_hw_available] {
lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign"
}