aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-28 20:34:48 +0200
committerlemon <lsof@mailbox.org>2022-08-28 20:34:48 +0200
commit6aeb4e79bf92863a3b5d41b22db71cf342c9b54e (patch)
tree2415c94ee0b0cdb9af161023e9baddc317da6ec2 /src
parent3529875bf083302c89158fe2981ad01f2c5d97f7 (diff)
llvm fix some bug
Diffstat (limited to 'src')
-rw-r--r--src/llvm.cff4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm.cff b/src/llvm.cff
index 2b49337..0031777 100644
--- a/src/llvm.cff
+++ b/src/llvm.cff
@@ -349,11 +349,11 @@ fn genload(f *Fn, ref Ref) Value {
let res = mktmp(fld.ty);
switch {
case dot.fld.ty->is(:Bool);
- let tmp = gentmp(ty_bool, "icmp ne i%d %v, 0", fld.size, truncd);
+ let tmp = gentmp(ty_i1, "icmp ne i%d %v, 0", fld.size, truncd);
gen("\t%v = zext i1 %v to %t\n", res, tmp, res.ty);
case dot.fld.ty->is(:Int);
gen("\t%v = %s i%d %v to %t\n", res,
- dot.fld.ty.u.Int.sgn ? "sext" : "zext", truncd, fld.size, lhs.ty);
+ dot.fld.ty.u.Int.sgn ? "sext" : "zext", fld.size, truncd, lhs.ty);
case else assert(#f, "");
}
return res;