Artifact 197e607e235b3d9322fb6b2a7027a603ec9a9feb878fc305e58241f5d4f9e875:
- File
tests/noprelude/codegen/arithops.g
— part of check-in
[8c4fcc68b0]
at
2020-02-09 16:55:47
on branch trunk
—
- The builtin integer division and modulo operators now require a compile-time proof that the divider is not zero.
- The builtin integer left shit and right shift operators now require a compile-time proof that the rhs value is less than the bitsize of lhs.
var module = CGModuleCreate( "arith ops test" ) using entryPoint = void( uint( 8 ) a, uint( 8 ) b , sint( 16 ) c, sint( 16 ) d ) requires [b!=0 d!=0] { -c a + b a - b a * b a / b c / d a % b c % d } CGGenerateFunction( module, entryPoint, "main" ) CGModuleEmitLLVMIr( module, "tests/noprelude/codegen/arithops.ll" )