about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-01-30 13:38:27 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-02-01 17:58:03 +0100
commit9c3a1235c5273e01b6e52ea5bbe5e047c7a97778 (patch)
tree6f3d6eccc9c571608e225a872a9f10010ea06753 /src
parent7aaa87bcd24d82cf9ee50912d71ac304aeef88dc (diff)
downloadrust-9c3a1235c5273e01b6e52ea5bbe5e047c7a97778.tar.gz
rust-9c3a1235c5273e01b6e52ea5bbe5e047c7a97778.zip
Fix type_kind implementation
Diffstat (limited to 'src')
-rw-r--r--src/type_.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type_.rs b/src/type_.rs
index 3c96cd6afc2..e9505808521 100644
--- a/src/type_.rs
+++ b/src/type_.rs
@@ -121,10 +121,10 @@ impl<'gcc, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
         if self.is_int_type_or_bool(typ) {
             TypeKind::Integer
         }
-        else if typ == self.float_type {
+        else if typ.is_compatible_with(self.float_type) {
             TypeKind::Float
         }
-        else if typ == self.double_type {
+        else if typ.is_compatible_with(self.double_type) {
             TypeKind::Double
         }
         else if typ.dyncast_vector().is_some() {