4 Commits

Author SHA1 Message Date
Nikita Popov
8b8f2ef06e [MergeFunc] Fix comparison of constant expressions
Functions using different constant expressions were incorrectly
merged, because a lot of state was missing from the comparison,
including the opcode, the comparison predicate, the GEP element
type, as well as the inbounds, inrange and nowrap poison flags.
2023-12-20 15:59:02 +01:00
Nikita Popov
836e71a425 [MergeFunc] Adjust GEP indices in test (NFC)
Otherwise inbounds will be inferred, and we don't actually end
up testing the case of one gep without inbounds and one with.
2023-12-20 15:08:13 +01:00
Nikita Popov
3dd2db08a2 [MergeFunc] Add another test for incorrect constexpr merging (NFC)
Looks like we don't even check the opcode :(
2023-12-20 14:53:25 +01:00
Nikita Popov
1ff9fb78c8 [MergeFunc] Add tests for incorrect const expr merging (NFC) 2023-12-20 14:42:21 +01:00