Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[InstCombine] Failure to simplify (~A|B)^A --> ~(A&B) #51485

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR52518
Status NEW
Importance P enhancement
Reported by Jay Foad (jay.foad@gmail.com)
Reported on 2021-11-16 01:07:56 -0800
Last modified on 2021-11-21 11:19:33 -0800
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, mehrnoosh.heidarpour@huawei.com, spatel+llvm@rotateright.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
InstCombine should simplify (~A|B)^A --> ~(A&B).

Here's CompilerExplorer showing that (a) the transformation is valid according
to Alive2, and (b) "opt -O2" does not do it:
https://alive2.llvm.org/ce/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAM1QDsCBlZAQwBtMQBGAFlICsupVs1qhWrAG4BbUgGdM7ZATx1KmWugDCqVgFcptLgFZS69ABk8tTADl9AI0zEQAdlIAHVLMIra2vQbGHl4%2BdJbWdlKOzm7yisp0DATMxAT%2B%2BoacJnGYSr5JKQThtg5OrnLJqemBWRWFxZHRrgCUcqi6xMgcAORYVFaYANR43IMAAgTABBAjgwCkAExGAAykw6OLRpzNg6yoLKwA%2Brq0tMxSmOiHzOjoxPMLAMzL8y4AQnPLAIL29iCfX0GDyMC3mjwAIoMROh1sDOGtNssAUDNo8wZCAB4kWGbBZrAC0nGRg2ImAIOKWjwBcxc4IBfQGsLGsk6Mw2S1WFK2Oz2B2Op3Ol2ut3ui2erw%2B31%2B/2%2BKKWoLmEMGWPus0RBKJsuBaMVkOxavlCKWmsBwI2SpVXMeRpWxNJ5INRm41NpAO6rVYIG6Rm6pEM3WWvtQXvM5gAagBZQYASQASoNZO1OkMxZxfQQvYHmq0ANYgFZCL3cX3%2BwOkYPdX2yECrDMB92kOCwGCIFCoKTuPDsMgUCBoDtdsqodwEUj9VgEJzViB/eukexWFIATy9adI/Yu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