diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-10-10 20:45:15 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-10-10 20:45:15 +0000 |
commit | 779825d20edd5bc7e3f2685152e701a0fd925601 (patch) | |
tree | 4dceb7c32ba2759fd39bad957ae6f28535dd1a2f /test/CodeGen/MSP430 | |
parent | 5556ebb3658c28b52d7fa49c1032a915447d0474 (diff) |
[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
Add integer expansion for FLT_ROUNDS_ for targets where i32 is not a legal
type.
Patch by Edward Jones, thanks!
Differential Revision: https://reviews.llvm.org/D24459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/MSP430')
-rw-r--r-- | test/CodeGen/MSP430/flt_rounds.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/MSP430/flt_rounds.ll b/test/CodeGen/MSP430/flt_rounds.ll new file mode 100644 index 00000000000..fb89363d4d0 --- /dev/null +++ b/test/CodeGen/MSP430/flt_rounds.ll @@ -0,0 +1,10 @@ +; RUN: llc -verify-machineinstrs < %s -march=msp430 + +define i16 @foo() { +entry: + %0 = call i32 @llvm.flt.rounds() + %1 = trunc i32 %0 to i16 + ret i16 %1 +} + +declare i32 @llvm.flt.rounds() nounwind |