Skip to content

Instantly share code, notes, and snippets.

@GiorgioRegni
Created September 9, 2010 12:34
Show Gist options
  • Save GiorgioRegni/571811 to your computer and use it in GitHub Desktop.
Save GiorgioRegni/571811 to your computer and use it in GitHub Desktop.
<result> = add i32 4, %var ; yields {i32}:result = 4 + %var
<result> = fadd float 4.0, %var ; yields {float}:result = 4.0 + %var
<result> = sub i32 0, %val ; yields {i32}:result = -%var
<result> = fsub float 4.0, %var ; yields {float}:result = 4.0 - %var
<result> = mul i32 4, %var ; yields {i32}:result = 4 * %var
<result> = fmul float 4.0, %var ; yields {float}:result = 4.0 * %var
<result> = udiv i32 4, %var ; yields {i32}:result = 4 / %var
<result> = sdiv i32 4, %var ; yields {i32}:result = 4 / %var
<result> = fdiv float 4.0, %var ; yields {float}:result = 4.0 / %var
<result> = urem i32 4, %var ; yields {i32}:result = 4 % %var
<result> = srem i32 4, %var ; yields {i32}:result = 4 % %var
<result> = frem float 4.0, %var ; yields {float}:result = 4.0 % %var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment