Commit f67691e
committed
Byte-operator lowering: do not unconditionally insert bv cast
In 848e633 a cast to bv was inserted to block interpreting floatbv
type casts from taking place. It was unnecessarily inserted for all
bitvector types. While this does not result in wrong semantics, it may
block simplification for happening when we end up (via other simplifier
rules) creating a bv (and not (un)signed bv) typed constant. All of
these transformations are correct, but we may end up with an equality
over pointer-typed constants where the underlying constant is a(n)
(un)signed bv on one side, and a bv on the other side. The bit patterns
match, so the back-end will correctly solve this, but the simplifier
cannot.
Observed when studying
model-checking/kani#1978.1 parent e024ecb commit f67691e
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
| 340 | + | |
344 | 341 | | |
345 | 342 | | |
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
349 | 346 | | |
350 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
| |||
0 commit comments