See https://llvm.org/bugs/show_bug.cgi?id=30448 for the full discussion, and thanks to Eli helping finding the problem
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This fixes the miscompile reported in PR30448. I tried on many internal tests and bootstrapping clang, and it works without problems. We lose some optimization power, but it seems that the pattern is rare enough so we shouldn't really worry.