From: Jakub Jelinek Date: Fri, 2 Mar 2018 07:57:26 +0000 (+0100) Subject: re PR inline-asm/84625 (ICE with empty constraint and vector constant) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f2fca6fe8ed18b48bd25390082392dcb35e4d0c;p=gcc.git re PR inline-asm/84625 (ICE with empty constraint and vector constant) PR inline-asm/84625 * config/i386/i386.c (ix86_print_operand): Use conditional output_operand_lossage instead of gcc_assert if CONST_VECTOR is not zero vector. * gcc.target/i386/pr84625.c: New test. From-SVN: r258125 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6200f2f4f47..bb32cf440e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-03-02 Jakub Jelinek + + PR inline-asm/84625 + * config/i386/i386.c (ix86_print_operand): Use conditional + output_operand_lossage instead of gcc_assert if CONST_VECTOR is not + zero vector. + 2018-03-02 Richard Biener PR tree-optimization/84427 @@ -117,7 +124,7 @@ they act more like predicates and should be subject to "lost tail" side-effect preserving. -2018-02-28 Alexandre Oliva +2018-02-28 Alexandre Oliva PR rtl-optimization/81611 * auto-inc-dec.c (attempt_change): Move dead note from @@ -170,7 +177,7 @@ 'ggc' suffixes. Change first column width. (timer::print): Fix formatting of the column. -2018-02-27 Alexandre Oliva +2018-02-27 Alexandre Oliva * tree-ssa-live.c (remove_unused_scope_block_p): Do not preserve inline entry blocks for the sake of debug inline @@ -895,7 +902,7 @@ (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert to named insn, correct maximum insn length. -2018-02-14 Jozef Lawrynowicz +2018-02-14 Jozef Lawrynowicz PR target/79242 * machmode.def: Define a complex mode for PARTIAL_INT. @@ -939,7 +946,7 @@ * config/rl78/rl78.c (rl78_handle_func_attribute): Mark ARGS as unused. -2018-02-13 Alexandre Oliva +2018-02-13 Alexandre Oliva PR debug/84342 PR debug/84319 @@ -986,7 +993,7 @@ handling. Also check whether the anti-range contains any values that satisfy the mask; switch to a VR_RANGE if not. -2018-02-13 Paolo Bonzini +2018-02-13 Paolo Bonzini PR sanitizer/84340 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec. @@ -1082,7 +1089,7 @@ (vectorizable_condition): Likewise. (vectorizable_comparison): Likewise. -2018-02-12 Paolo Bonzini +2018-02-12 Paolo Bonzini PR sanitizer/84307 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value. @@ -1162,7 +1169,7 @@ * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]): Cast vec_cmpgt result to correct type. -2018-02-11 Alexandre Oliva +2018-02-11 Alexandre Oliva * final.c (final_scan_insn_1): Renamed from... (final_scan_insn): ... this. New wrapper, to recover @@ -1263,7 +1270,7 @@ * config/s390/s390.c (s390_set_current_function): Invoke s390_indirect_branch_settings also if fndecl didn't change. -2018-02-09 Alexandre Oliva +2018-02-09 Alexandre Oliva * config/rs6000/rs6000.md (blockage): Set length to zero. @@ -1297,7 +1304,7 @@ Formatting fixes. Verify first that tree_fits_poly_int64_p (op01). Sync some changes from cxx_fold_indirect_ref. -2018-02-09 Alexandre Oliva +2018-02-09 Alexandre Oliva * cfgexpand.c (expand_gimple_basic_block): Handle inline entry markers. @@ -2146,7 +2153,7 @@ dependence against last_pending_memory_flush in addition to pending_jump_insns. -2018-01-30 Alexandre Oliva +2018-01-30 Alexandre Oliva PR tree-optimization/81611 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening @@ -2223,7 +2230,7 @@ Turning off pre increment/decrement/modify allows IVOPTS to optimize DF/SF loops where the index is an int. -2018-01-29 Richard Biener +2018-01-29 Richard Biener Kelvin Nilsen PR bootstrap/80867 @@ -2231,7 +2238,7 @@ targetm.vectorize_builtin_md_vectorized_function if callee is NULL. -2018-01-22 Carl Love +2018-01-22 Carl Love * doc/extend.tex: Fix typo in second arg in __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}. @@ -2368,7 +2375,7 @@ * config/arc/constraints.md (Csc): New constraint. 2018-01-26 Claudiu Zissulescu - John Eric Martin + John Eric Martin * config/arc/arc-protos.h: Add arc_is_jli_call_p proto. * config/arc/arc.c (_arc_jli_section): New struct. @@ -2810,7 +2817,7 @@ * config/rl78/rl78.md (smaxdi3): New define_expand. -2018-01-22 Carl Love +2018-01-22 Carl Love * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI, LVX_V1TI): Add macro expansion. @@ -2855,7 +2862,7 @@ Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check. 2018-01-21 Bill Schmidt - David Edelsohn + David Edelsohn PR target/83946 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv): diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 49f872d103f..1843e5d3377 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18743,7 +18743,8 @@ ix86_print_operand (FILE *file, rtx x, int code) since we can in fact encode that into an immediate. */ if (GET_CODE (x) == CONST_VECTOR) { - gcc_assert (x == CONST0_RTX (GET_MODE (x))); + if (x != CONST0_RTX (GET_MODE (x))) + output_operand_lossage ("invalid vector immediate"); x = const0_rtx; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5aa006d8f8..b035c357dbe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-02 Jakub Jelinek + + PR inline-asm/84625 + * gcc.target/i386/pr84625.c: New test. + 2018-03-02 Richard Biener PR tree-optimization/84427 @@ -374,7 +379,7 @@ * g++.dg/gomp/pr84556.C: New test. * g++.dg/vect/pr84556.cc: New test. -2018-02-26 Dominique d'Humieres +2018-02-26 Dominique d'Humieres PR fortran/32957 * gfortran.dg/c_f_pointer_shape_tests_2.f03: Use explicit KIND c_int. @@ -420,7 +425,7 @@ PR fortran/78238 * gfortran.dg/select_type_40.f90: New test. -2018-02-24 Steven G. Kargl +2018-02-24 Steven G. Kargl PR fortran/30792 * gfortran.dg/data_substring.f90: New test. @@ -3410,7 +3415,7 @@ PR target/83831 * gcc.target/rx/pr83831.c: New tests. -2018-02-14 Jozef Lawrynowicz +2018-02-14 Jozef Lawrynowicz PR target/79242 * gcc.target/msp430/pr79242.c: New test. @@ -3912,7 +3917,7 @@ PR c++/71662 * g++.dg/cpp0x/scoped_enum7.C: New. -2018-02-07 Christophe Lyon +2018-02-07 Christophe Lyon PR tree-optimization/83008 * gcc.dg/cse_recip.c: Add -fno-tree-slp-vectorize. @@ -4040,7 +4045,7 @@ PR middle-end/79966 * gfortran.dg/pr79966.f90: New testcase -2018-02-04 Dominique d'Humieres +2018-02-04 Dominique d'Humieres PR fortran/84094 * gfortran.dg/associate_23.f90: Fix invalid code. @@ -4883,7 +4888,7 @@ PR c++/81933 * g++.dg/cpp1y/constexpr-empty4.C: New test. -2018-01-22 Will Schmidt +2018-01-22 Will Schmidt * gcc.target/powerpc/fold-vec-abs-short-fwrap.c: Add xxspltib to scan-asembler valid instructions list. @@ -4927,7 +4932,7 @@ * gcc.dg/pr83666.c: Likewise. 2018-01-21 Bill Schmidt - David Edelsohn + David Edelsohn PR target/83946 * gcc.target/powerpc/safe-indirect-jump-1.c: Change expected @@ -5044,7 +5049,7 @@ PR c++/81013 * g++.dg/inherit/union3.C: New. -2018-01-18 Christophe Lyon +2018-01-18 Christophe Lyon * gcc.dg/rtl/arm/stl-cond.c: Enable on arm*. @@ -5053,7 +5058,7 @@ PR ipa/83619 * g++.dg/torture/pr83619.C: New testcase. -2018-01-18 Christophe Lyon +2018-01-18 Christophe Lyon * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add function body to force error messages in some configurations. @@ -6625,7 +6630,7 @@ PR target/83330 * gcc.target/i386/pr83330.c: New test. -2018-01-11 Steven G. Kargl +2018-01-11 Steven G. Kargl PR fortran/79383 * gfortran.dg/dtio_31.f03: New test. @@ -6987,7 +6992,7 @@ PR fortran/83741 * gfortran.dg/allocate_assumed_charlen_3.f90: New test. -2018-01-08 Chih-Mao Chen +2018-01-08 Chih-Mao Chen Monk Chiang * gcc.target/riscv/save-restore-1.c: New. @@ -7003,7 +7008,7 @@ * g++.dg/pr81308-1.C: New test. * g++.dg/pr81308-2.C: New test. -2018-01-08 Vidya Praveen +2018-01-08 Vidya Praveen PR target/83663 - Revert r255946 * gcc.target/aarch64/vect-slp-dup.c: New. diff --git a/gcc/testsuite/gcc.target/i386/pr84625.c b/gcc/testsuite/gcc.target/i386/pr84625.c new file mode 100644 index 00000000000..600a6f15a9a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr84625.c @@ -0,0 +1,12 @@ +/* PR inline-asm/84625 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -msse2" } */ + +typedef int V __attribute__((vector_size (16))); + +void +foo (void) +{ + asm volatile ("# %0" : : "X" ((V) { 1, 2, 3, 4 })); // { dg-error "invalid vector immediate" } + asm volatile ("# %0" : : "" ((V) { 2, 3, 4, 5 })); // { dg-error "invalid vector immediate" } +}