aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-09-09 23:40:01 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-09-10 00:55:00 +0200
commite5cbdb62b0e3dc49244dfbcbe90f5fe5ea370a05 (patch)
tree7941d96b8eb7ace4bfbca6ed98093cac44323b94 /validation/mem2reg
parent6c522d114cef173215686b3394ae41701ea80aa4 (diff)
downloadsparse-dev-e5cbdb62b0e3dc49244dfbcbe90f5fe5ea370a05.tar.gz
ssa: relax what can be promoted
During SSA conversion, it is checked what can be promoted and what cannot. Obviously, ints, longs, pointers can be promoted, enums and bitfields can too. Complication arise with unions and structs. Currently union are only accepted if they contains integers of the same size. For structs its even more complicated because we want to convert simple bitfields. What should be accepted is structs containing either: * a single scalar * only bitfields and only if the total size is < long However the test was slightly more strict than that: it dodn't allowed a struct with a total size bigger than a long. As consequence, on IP32, a struct containing a single double wasn't promoted. Fix this by moving the test about the total size and only if some bitfield was present. Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/mem2reg')
-rw-r--r--validation/mem2reg/init-local32.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/validation/mem2reg/init-local32.c b/validation/mem2reg/init-local32.c
index c988bb6e..9a65c205 100644
--- a/validation/mem2reg/init-local32.c
+++ b/validation/mem2reg/init-local32.c
@@ -21,8 +21,6 @@ double sdouble(void)
/*
* check-name: init-local32
* check-command: test-linearize -Wno-decl -m32 -fdump-ir=mem2reg $file
- * check-known-to-fail
- *
* check-output-ignore
* check-output-excludes: load\\.
* check-output-excludes: store\\.