Skip to content

Commit

Permalink
Backport a fix for the simpler bug in lossless_cast (#8264)
Browse files Browse the repository at this point in the history
Fix the simpler bug in lossless_cast

The full fix to lossless_cast is too complicated to backport
  • Loading branch information
abadams authored Jun 7, 2024
1 parent 5254117 commit 54a7f1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IROperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ Expr lossless_cast(Type t, Expr e) {
Expr a = lossless_cast(t.narrow(), sub->a);
Expr b = lossless_cast(t.narrow(), sub->b);
if (a.defined() && b.defined()) {
return cast(t, a) + cast(t, b);
return cast(t, a) - cast(t, b);
} else {
return Expr();
}
Expand Down

0 comments on commit 54a7f1d

Please sign in to comment.