Skip to content

Instantly share code, notes, and snippets.

@ochafik
Created May 2, 2012 13:02
Show Gist options
  • Save ochafik/2576377 to your computer and use it in GitHub Desktop.
Save ochafik/2576377 to your computer and use it in GitHub Desktop.
def propagateZero(a: Int, b: Int) =
when(a * b) {
case List(IntConstant(0), _) | List(_, IntConstant(0)) =>
replaceBy(0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment