Fix float add/mul reduction codegen

The accumulator is now respected for unordered reductions.
This commit is contained in:
Nikita Popov 2019-07-07 19:08:40 +02:00
parent 8789c9e595
commit 5c95f5fa6b
4 changed files with 9 additions and 2 deletions

View file

@ -249,6 +249,10 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
self.const_uint(self.type_i8(), i as u64)
}
fn const_real(&self, t: &'ll Type, val: f64) -> &'ll Value {
unsafe { llvm::LLVMConstReal(t, val) }
}
fn const_struct(
&self,
elts: &[&'ll Value],