[LLVMdev] SCCP and undef branches
Nick Lewycky
nicholas at mxc.ca
Mon Jun 5 12:21:51 PDT 2006
I found that "undef" was disappearing early into the optimization chain.
SCCP was the culprit, transforming:
br bool undef, label %T, label %F
into
br bool true, label %T, label %F
While that sounds like a great optimization, it shouldn't be happening
that early. I've put together a patch which modifies the behaviour of
SCCP so that it preserves undef in those cases.
I had to modify one of the regression tests which was trying to test
IPSCCP on global variables, but was uses undef and expecting the above
transformation to take place. I changed its global from undef to true,
and wrote a new testcase for the undef-related part.
Patch attached. Comments?
Nick Lewycky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sccp-branch-undef.patch
Type: text/x-patch
Size: 3800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060605/1da45df2/attachment.bin>
More information about the llvm-dev
mailing list