Skip to content

Commit

Permalink
Merge pull request #362 from scala-native/topic/fix-360
Browse files Browse the repository at this point in the history
Fix #360
  • Loading branch information
densh committed Oct 28, 2016
2 parents fb52893 + 16948c5 commit ff3ecf7
Show file tree
Hide file tree
Showing 4 changed files with 1,043 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ class GenTextualLLVM(assembly: Seq[Defn]) extends GenShow(assembly) {
case Comp.Sle => "icmp sle"
case Comp.Sgt => "icmp sgt"
case Comp.Sge => "icmp sge"
case Comp.Feq => "fcmp ueq"
case Comp.Feq => "fcmp oeq"
case Comp.Fne => "fcmp une"
case Comp.Flt => "fcmp ult"
case Comp.Fle => "fcmp ule"
case Comp.Fgt => "fcmp ugt"
case Comp.Fge => "fcmp uge"
case Comp.Flt => "fcmp olt"
case Comp.Fle => "fcmp ole"
case Comp.Fgt => "fcmp ogt"
case Comp.Fge => "fcmp oge"
}
sh"$cmp $l, ${justVal(r)}"
case Op.Conv(name, ty, v) =>
Expand Down
4 changes: 2 additions & 2 deletions unit-tests/src/main/scala/java/lang/FloatSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ object FloatSuite extends tests.Suite {

val x = Float.NaN
val y = intBitsToFloat(floatToRawIntBits(x) | 1)
// assertNot(x == y) // FIXME this works on the JVM, but fails on native.
assertNot(x == y)

val z = intBitsToFloat(floatToIntBits(x) | 1)
// assertNot(x == z) // FIXME this works on the JVM, but fails on native.
assertNot(x == z)
}

test("eq") {
Expand Down

0 comments on commit ff3ecf7

Please sign in to comment.