]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
riscv: thead: Fix mode attribute for extension patterns
authorChristoph Müllner <christoph.muellner@vrull.eu>
Fri, 8 Sep 2023 06:03:23 +0000 (08:03 +0200)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Fri, 8 Sep 2023 11:28:37 +0000 (13:28 +0200)
The mode attribute of an extension pattern is usually set to the target type.
Let's follow this convention consistently for xtheadbb.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/ChangeLog:

* config/riscv/thead.md: Use more appropriate mode attributes
for extensions.

gcc/config/riscv/thead.md

index 29f98dec3a8a35bb4387d15e351a437bd9d66195..c6bd6887f9f7d0153c8ac525a1b81a71c3ee7acf 100644 (file)
@@ -90,7 +90,7 @@
    th.extu\t%0,%1,31,0
    lwu\t%0,%1"
   [(set_attr "type" "bitmanip,load")
-   (set_attr "mode" "SI")])
+   (set_attr "mode" "DI")])
 
 (define_insn "*zero_extendhi<GPR:mode>2_th_extu"
   [(set (match_operand:GPR 0 "register_operand" "=r,r")
    th.extu\t%0,%1,15,0
    lhu\t%0,%1"
   [(set_attr "type" "bitmanip,load")
-   (set_attr "mode" "HI")])
+   (set_attr "mode" "<GPR:MODE>")])
 
 (define_insn "*th_clz<mode>2"
   [(set (match_operand:X 0 "register_operand" "=r")