gallivm: fix floating type in lp_build_mod helper
authorRoland Scheidegger <sroland@vmware.com>
Mon, 5 Mar 2012 18:09:56 +0000 (19:09 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 5 Mar 2012 18:09:56 +0000 (19:09 +0100)
untested, but cannot have worked before.

src/gallium/auxiliary/gallivm/lp_bld_arit.c

index 4cc421d6215359224cd3adec17dca2ae8925f316..6b17fbd2d31043708ea860311d992ec591653b1c 100644 (file)
@@ -2571,7 +2571,7 @@ lp_build_mod(struct lp_build_context *bld,
 
    if (type.floating)
       res = LLVMBuildFRem(builder, x, y, "");
-   if (type.sign)
+   else if (type.sign)
       res = LLVMBuildSRem(builder, x, y, "");
    else
       res = LLVMBuildURem(builder, x, y, "");