华为计算微信公众号
华为计算微博
华为计算今日头条
毕昇3.1.0的opt在通过“-passes=correlated-propagation,dce,flattencfg”编译特定代码时会生成错误代码
Command Lines:
clang -O3 -mllvm -disable-llvm-optzns -c -emit-llvm a.c -o a.bc opt -passes=correlated-propagation,dce,flattencfg a.bc -o a.opt.bc clang a.opt.bc -o a.out ./a.out Floating point exception (core dumped)
Source Code:
int a; void b() { int c; unsigned int d = 6; c = 3 % (((a || 0) < 0) - d || 0); } int main() { b(); }
我要发帖子
毕昇3.1.0的opt在通过“-passes=correlated-propagation,dce,flattencfg”编译特定代码时会生成错误代码
Command Lines:
Source Code:
int a; void b() { int c; unsigned int d = 6; c = 3 % (((a || 0) < 0) - d || 0); } int main() { b(); }