The address of the comparison value is expected from small to large,
so we can't reorder the comparison chain to judge the areContiguous.
Fix https://github.com/llvm/llvm-project/issues/62459
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Any thoughts on introducing appropriate "freeze" instructions, instead of suppressing the transform?
llvm/lib/Transforms/Scalar/MergeICmps.cpp | ||
---|---|---|
494 | "anew" is correct here |
Comment Actions
Thanks very much for your advice, I tried to add freeze for the return value of memcmp, but it is still inconsistent (https://alive2.llvm.org/ce/z/gVHbUS) . Did I add it the wrong way?
Comment Actions
For the non-memcmp case, see https://alive2.llvm.org/ce/z/_RDywP .
re: memcmp, if https://github.com/llvm/llvm-project/issues/62459#issuecomment-1528966123 is right, alive2 probably doesn't have the right memcmp semantics. Haven't thought it through.
Comment Actions
as the discussion above, the miscompile doesn't need to be handled because alive2 doesn't have the right memcmp semantics.
"anew" is correct here