Commit d5011496 by Uros Bizjak Committed by Uros Bizjak

re PR target/88938 (ICE in extract_insn, at recog.c:2304)

	PR target/88938
	* config/i386/i386.c (ix86_expand_builtin) [case IX86_BUILTIN_BEXTRI32,
	case IX86_BUILTIN_BEXTRI64]: Sanitize operands.

testsuite/ChangeLog:

	PR target/88938
	* gcc.target/i386/pr88938.c: New test.

From-SVN: r268123
parent 52e67970
2019-01-21 Uroš Bizjak <ubizjak@gmail.com>
PR target/88938
* config/i386/i386.c (ix86_expand_builtin) [case IX86_BUILTIN_BEXTRI32,
case IX86_BUILTIN_BEXTRI64]: Sanitize operands.
2019-01-21 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* hash-map-tests.c (test_map_of_strings_to_int): Show how to use
......
......@@ -37215,6 +37215,16 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
unsigned char lsb_index = INTVAL (op1) & 0xFF;
op1 = GEN_INT (length);
op2 = GEN_INT (lsb_index);
mode1 = insn_data[icode].operand[1].mode;
if (!insn_data[icode].operand[1].predicate (op0, mode1))
op0 = copy_to_mode_reg (mode1, op0);
mode0 = insn_data[icode].operand[0].mode;
if (target == 0
|| !register_operand (target, mode0))
target = gen_reg_rtx (mode0);
pat = GEN_FCN (icode) (target, op0, op1, op2);
if (pat)
emit_insn (pat);
2019-01-21 Uroš Bizjak <ubizjak@gmail.com>
PR target/88938
* gcc.target/i386/pr88938.c: New test.
2019-01-21 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/88901
......
/* PR target/88938 */
/* { dg-do compile } */
/* { dg-options "-Og -fno-tree-ccp -fno-tree-fre -mtbm" } */
#include "tbm-bextri-1.c"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment