Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jayfoad opened this issue Nov 16, 2021 · 1 comment
Closed

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

jayfoad opened this issue Nov 16, 2021 · 1 comment
Labels
bugzilla Issues migrated from bugzilla llvm:optimizations

Comments

@jayfoad
Copy link
Contributor

jayfoad commented Nov 16, 2021

Bugzilla Link 52518
Version trunk
OS Linux
CC @RKSimon,@rotateright

Extended Description

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/Yu9AA8rRWCu51gpCJgOxM778KS8hJMNW55gMbldJPV76rJPPXPWHh7MRl9osC%2BpAEMQeBSC%2BrQ0PQTBsBwPD8IIwiiCA4jSEI37VpArTDgktC3viW4LFWCi5DhagaNUmSmBoDSlM48KeN4OEUYIDGhLQNFRGU8I5HkiSVGkOgZIIPE4QUqQcU03H8cxUn1AMjRca0iYdF0XAel6Pp%2Bme5ZethgwQLghDYqmazaAO3YPI82yDKGkYxrG6ZntmpAIJgNxlBAub5qsH7FqQYEFqWQZelWNZAU5jYthASD9p23bkJQsWDs4bB4NeY5dpOxDTrOZYLmcxD7muG7qAQO57tph7HqeB54JeyjXreZb3o%2Bz7dGub4KNpX4/n%2BGA9GuwGgeBY50IwBywbwAh4ohYiSDIPUYZ55Yjr4t5EfEvhkVogk1FRFjybRLEhExu2UaxOESVxcjEbxtBiQJASUSJ%2BT8VddF1FUZ3CW9h2cXRSlJqp2yFt6JbaRWqXXviBASPphlEKKTzwoMZlxU4lkLDstlRnGjn1s5rnuc4y2%2Bb6AWrEFOmVnIYV1lmXkFh%2Bjzg3OFb4wzoOEVpbMheFBOtNe2VbdwQA%3D%3D%3D

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@RKSimon
Copy link
Collaborator

RKSimon commented Feb 12, 2022

Fixed by D114339 / c572eb1

@RKSimon RKSimon closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:optimizations
Projects
None yet
Development

No branches or pull requests

3 participants