Giter Club home page Giter Club logo

Comments (2)

s-perron avatar s-perron commented on July 18, 2024

Look like I fixed the surface issue with #5561. However, I do not understand how we were getting the earlier result in the first place. I did not think that the OpSMod would have been folded, so it seems like there might be another bug that is now hidden. I'll leave this open while I try to determine what was happening before my change.

from spirv-tools.

s-perron avatar s-perron commented on July 18, 2024

The code that originally folded the OpSMod, would do an OSRem and then try to "fix" the value to account for the difference in definition:

int32_t rem = BinaryOperate(spv::Op::OpSRem, a, b);
int32_t b_prim = static_cast<int32_t>(b);
return (rem + b_prim) % b_prim;

The problem is that the third line overflows in this case, and give an incorrect value. Since we have a new implementation for OpSMod folding, which does not have this problem. I will simply delete that code.

from spirv-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.