NewPassManager is not using CodeGenOpts values before this patch.
[to be coupled with D61616]
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
Can you update some Clang IR generation test that uses these flags to run w/ the new PM? It should fail without this and pass with this.
LGTM w/ that test updated.
Added test. The last RUN line fails before this patch (i.e. the flag to disable vectorization was not used by the new pass manager)
The file name of the test seems odd? How about vectorize-loops.c? I'd also make it a C test and put it in test/CodeGen instead of a C++ test.
test/CodeGenCXX/no-pragma-loop.cpp | ||
---|---|---|
7 ↗ | (On Diff #198540) | I'd check for an instruction on a vector type as the block labels aren't really that stable. Should be able to just check for something like: // CHECK-LABEL: define @vectorize_loop_test { // CHECK: mul <{{[0-9]+}} x double> Or something... Also, you'll want to explicitly pass a target triple here and require that target to be registered so we're not flaky when the host target changes. |
(Sorry for still more comments)
test/CodeGen/loop-vectorize.c | ||
---|---|---|
11 | You'll want to check that the vector form *doesn't* show up. I would expect this to pass even w/ vectorization enabled due to potential fallback loops. |
test/CodeGen/loop-vectorize.c | ||
---|---|---|
1 | Please do not use %clang for codegen tests, please only use %clang_cc1. |
Please do not use %clang for codegen tests, please only use %clang_cc1.