[codegen] Don't simplify an operation if it would result in unnecessary legalization;

Converting something like iadd.i64 on a 32-bits architecture into a
iadd_imm.i64 will result in the instruction being legalized back to an
iadd.i64 later on, creating unnecessary churn.

This commit implements avoid doing so, and changes the target ISA to a
64-bits platform for tests than ran into this, as well as making sure
this won't happen on 32-bits platforms.
This commit is contained in:
Benjamin Bouvier
2019-09-09 18:18:41 +02:00
parent 3aa76b558c
commit cad2074587
5 changed files with 98 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
test simple_preopt
target i686 baseline
target x86_64 baseline
; Cases where the denominator is created by an iconst