From 96eb1765a38dd4074fdbaedef76b8b1fe1d7e175 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 6 Jul 2019 08:26:02 +0000 Subject: [PATCH] [amdgcn] Fix ambiguous .md attribute uses This patch is part of a series that fixes ambiguous attribute uses in .md files, i.e. cases in which attributes didn't use to specify an iterator, and in which could have different values depending on the iterator chosen. I think this is a genuine bugfix for the case in which the 1REG_MODE and 1REG_ALT are different, since previously we would use the 1REG_MODE for both the comparison and the select, even though the operands being compared are 1REG_ALT rather than 1REG_MODE. 2019-07-06 Richard Sandiford gcc/ * config/gcn/gcn-valu.md (vcond): Use gen_vec_cmpdi rather than (implicitly) gen_vec_cmpdi. Explicitly use gen_vcond_mask_di. (vcond_exec): Likewise, but using the _exec comparison patterns. (vcondu): Use gen_vec_cmpdi rather than (implicitly) gen_vec_cmpdi. Explicitly use gen_vcond_mask_di. (vcondu_exec): Likewise, but using the _exec comparison patterns. From-SVN: r273159 --- gcc/ChangeLog | 16 ++++++++++++++++ gcc/config/gcn/gcn-valu.md | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ae6b1c6a46..9dc0e093690 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2019-07-06 Richard Sandiford + + * config/gcn/gcn-valu.md + (vcond): Use + gen_vec_cmpdi rather than (implicitly) + gen_vec_cmpdi. Explicitly use + gen_vcond_mask_di. + (vcond_exec): Likewise, + but using the _exec comparison patterns. + (vcondu): Use + gen_vec_cmpdi rather than (implicitly) + gen_vec_cmpdi. Explicitly use + gen_vcond_mask_di. + (vcondu_exec): Likewise, + but using the _exec comparison patterns. + 2019-07-06 Richard Sandiford * config/arm/sync.md diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md index 3cc59dd1cd6..c7e8b160943 100644 --- a/gcc/config/gcn/gcn-valu.md +++ b/gcc/config/gcn/gcn-valu.md @@ -2574,10 +2574,10 @@ "" { rtx tmp = gen_reg_rtx (DImode); - emit_insn (gen_vec_cmpdi (tmp, operands[3], operands[4], - operands[5])); - emit_insn (gen_vcond_mask_di (operands[0], operands[1], operands[2], - tmp)); + emit_insn (gen_vec_cmpdi + (tmp, operands[3], operands[4], operands[5])); + emit_insn (gen_vcond_mask_di + (operands[0], operands[1], operands[2], tmp)); DONE; }) @@ -2592,10 +2592,10 @@ "" { rtx tmp = gen_reg_rtx (DImode); - emit_insn (gen_vec_cmpdi_exec (tmp, operands[3], operands[4], - operands[5], operands[6])); - emit_insn (gen_vcond_mask_di (operands[0], operands[1], operands[2], - tmp)); + emit_insn (gen_vec_cmpdi_exec + (tmp, operands[3], operands[4], operands[5], operands[6])); + emit_insn (gen_vcond_mask_di + (operands[0], operands[1], operands[2], tmp)); DONE; }) @@ -2609,10 +2609,10 @@ "" { rtx tmp = gen_reg_rtx (DImode); - emit_insn (gen_vec_cmpdi (tmp, operands[3], operands[4], - operands[5])); - emit_insn (gen_vcond_mask_di (operands[0], operands[1], operands[2], - tmp)); + emit_insn (gen_vec_cmpdi + (tmp, operands[3], operands[4], operands[5])); + emit_insn (gen_vcond_mask_di + (operands[0], operands[1], operands[2], tmp)); DONE; }) @@ -2627,10 +2627,10 @@ "" { rtx tmp = gen_reg_rtx (DImode); - emit_insn (gen_vec_cmpdi_exec (tmp, operands[3], operands[4], - operands[5], operands[6])); - emit_insn (gen_vcond_mask_di (operands[0], operands[1], operands[2], - tmp)); + emit_insn (gen_vec_cmpdi_exec + (tmp, operands[3], operands[4], operands[5], operands[6])); + emit_insn (gen_vcond_mask_di + (operands[0], operands[1], operands[2], tmp)); DONE; }) -- 2.30.2