tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.73k stars 257 forks source link

Add uitofp to the standard dialect. #335

Closed ombre5733 closed 4 years ago

ombre5733 commented 4 years ago

The operation 'uitofp', which converts an unsigned integer to a floating-point value was already part of the LLVM dialect. Contrary to its sibling 'sitofp' it had no corresponding operation in the standard dialect.

This adds UIToFPOp to the standard dialect and a lowering to 'uitofp' in LLVM. The work is mostly copy-paste of the existing SIToFPOp.

ombre5733 commented 4 years ago

This PR was made back in the days when MLIR was not integrated into LLVM. Since submissions happen via Phabricator now, I'm closing this issue. I'll re-submit something once I have time to familiarize with Phabricator, arcanist and whatever more is needed.