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

[miscompile] Don't de-negate and change direction of shifts-by-unsigned #6782

Merged
merged 1 commit into from
May 26, 2022

Commits on May 26, 2022

  1. [miscompile] Don't de-negate and change direction of shifts-by-unsigned

    I'm afraid the problem is really obvious:
    https://github.com/halide/Halide/blob/b5f024fa83b6f1cfe5e83a459c9378b7c5bf096d/src/CodeGen_LLVM.cpp#L2628-L2649
    ^ the shift direction is treated as flippable by the codegen
    iff the shift amount is signed :)
    
    The newly-added test fails without the fix.
    
    I've hit this when writing tests for halide#6775
    LebedevRI committed May 26, 2022
    Configuration menu
    Copy the full SHA
    72c3c1a View commit details
    Browse the repository at this point in the history