Revert "ac/nir: handle negate modifier"
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 2 Aug 2019 09:14:50 +0000 (11:14 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 2 Aug 2019 09:14:50 +0000 (11:14 +0200)
This reverts commit bfea7e4d2965269bff8f1f6449cb99c312fd7384.

src/amd/common/ac_nir_to_llvm.c

index f78daf694e898fd65594d7efb2d26a79617cfae4..457a8d717039f13d1e64de96e14fa2e9063a8e3d 100644 (file)
@@ -187,18 +187,7 @@ static LLVMValueRef get_alu_src(struct ac_nir_context *ctx,
                                                       swizzle, "");
                }
        }
-
-       if (src.negate) {
-               LLVMTypeRef type = LLVMTypeOf(value);
-               if (LLVMGetTypeKind(type) == LLVMVectorTypeKind)
-                       type = LLVMGetElementType(type);
-
-               if (LLVMGetTypeKind(type) == LLVMIntegerTypeKind)
-                       value = LLVMBuildNeg(ctx->ac.builder, value, "");
-               else
-                       value = LLVMBuildFNeg(ctx->ac.builder, value, "");
-       }
-
+       assert(!src.negate);
        assert(!src.abs);
        return value;
 }