Skip to content

Commit 6de5a83

Browse files
authored
Update autovectorization-conditionals.md
1 parent 2f9196f commit 6de5a83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/learning-paths/cross-platform/loop-reflowing/autovectorization-conditionals.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In the previous section, you learned that compilers cannot autovectorize loops w
1010

1111
In this section, you will see more examples of loops with branches.
1212

13-
You will learn when it is possible to enable the vectorizer in the compiler by adapting the loop, and when you are required to modify the algorithm or write manually optimized code.
13+
You will learn when it is possible to enable the vectorizer in the compiler by adapting the loop and when you are required to modify the algorithm or write manually optimized code.
1414

1515
### Loops with if/else/switch statements
1616

@@ -48,9 +48,9 @@ void addvecweight(float *restrict C, float *A, float *B, size_t N) {
4848

4949
These are two different loops that the compiler can vectorize.
5050

51-
Both GCC and Clang can autovectorize this loop, but the output is slightly different, performance may vary depending on the flags used and the exact nature of the loop.
51+
Both GCC and Clang can autovectorize this loop but the output is slightly different, and performance may vary depending on the flags used and the exact nature of the loop.
5252

53-
However, the loop below is autovectorized by Clang but it is not autovectorized by GCC.
53+
The loop below is autovectorized by Clang but it is not autovectorized by GCC.
5454

5555
```C
5656
void addvecweight2(float *restrict C, float *A, float *B,
@@ -111,4 +111,4 @@ void addvecweight(float *restrict C, float *A, float *B,
111111
112112
The cases you have seen so far are generic, they work the same for any architecture.
113113
114-
In the next section, you will see Arm-specific cases for autovectorization.
114+
In the next section, you will see Arm-specific cases for autovectorization.

0 commit comments

Comments
 (0)