]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Fix mode size comparision in loongarch_expand_conditional_move
authorXi Ruoyao <xry111@xry111.site>
Wed, 12 Jun 2024 03:01:53 +0000 (11:01 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 12 Jun 2024 12:38:09 +0000 (20:38 +0800)
commit53c703888eb51314f762c8998dc9215871b12722
treead52c34c789f40975fb7ce1c109e9ae06b2e50d8
parent7663154c93a0193e88e1d8a1f24e4617dcaf9058
LoongArch: Fix mode size comparision in loongarch_expand_conditional_move

We were comparing a mode size with word_mode, but word_mode is an enum
value thus this does not really make any sense.  (Un)luckily E_DImode
happens to be 8 so this seemed to work, but let's make it correct so it
won't blow up when we add LA32 support or add another machine mode...

gcc/ChangeLog:

* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Compare mode size with
UNITS_PER_WORD instead of word_mode.
gcc/config/loongarch/loongarch.cc