使用GCC时如何禁用向量化? [英] How can I disable vectorization while using GCC?

查看:111
本文介绍了使用GCC时如何禁用向量化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下命令编译代码:

I am compiling my code using following command:

gcc -O3 -ftree-vectorizer-verbose=6 -msse4.1 -ffast-math 

所有优化均已启用.

但是我想在保持其他优化的同时禁用向量化.

But I want to disable vectorization while keeping the other optimizations.

推荐答案

大多数GCC开关可与no前缀一起使用以禁用其行为.尝试使用-fno-tree-vectorize(在命令行上的-O3之后).

Most of the GCC switches can be used with a no prefix to disable their behavior. Try with -fno-tree-vectorize (after -O3 on the command line).

这篇关于使用GCC时如何禁用向量化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆