-
Notifications
You must be signed in to change notification settings - Fork 1
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
pre-commit: test PR80941 #199
Conversation
baseline: llvm/llvm-project@adbf21f |
This patch canonicalizes floating-point comparisons with inf: ``` fcmp olt X, +inf -> fcmp one X, +inf fcmp ole X, +inf -> fcmp ord X, 0 fcmp ogt X, +inf -> false fcmp oge X, +inf -> fcmp oeq X, +inf fcmp ult X, +inf -> fcmp une X, +inf fcmp ule X, +inf -> true fcmp ugt X, +inf -> fcmp uno X, 0 fcmp uge X, +inf -> fcmp ueq X, +inf fcmp olt X, -inf -> false fcmp ole X, -inf -> fcmp oeq X, -inf fcmp ogt X, -inf -> fcmp one X, -inf fcmp oge X, -inf -> fcmp ord X, 0 fcmp ult X, -inf -> fcmp uno X, 0 fcmp ule X, -inf -> fcmp ueq X, -inf fcmp ugt X, -inf -> fcmp une X, -inf fcmp uge X, -inf -> true ``` Alive2: https://alive2.llvm.org/ce/z/FRqqDg The motivation of this patch is to fix the regression found in dtcxzyw/llvm-opt-benchmark#199 (comment).
This patch generalizes `simplifyAndOrOfFCmps` to simplify patterns like: ``` define i1 @src(float %x, float %y) { %or.cond.i = fcmp ord float %x, 0.000000e+00 %cmp.i.i34 = fcmp olt float %x, %y %cmp.i2.sink.i = and i1 %or.cond.i, %cmp.i.i34 ret i1 %cmp.i2.sink.i } define i1 @tgt(float %x, float %y) { %cmp.i.i34 = fcmp olt float %x, %y ret i1 %cmp.i.i34 } ``` Alive2: https://alive2.llvm.org/ce/z/9rydcx This patch and #80986 will fix the regression introduced by #80941. See also the IR diff dtcxzyw/llvm-opt-benchmark#199 (comment).
baseline: llvm/llvm-project@067d277 |
baseline: llvm/llvm-project@067d277 |
PR Link: llvm/llvm-project#80941