- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
I'm having an issue with a port from ifort 11.1 32-bit to 14.0.1 64-bit on a Linux platform. In the test case I've attached, the 11.1 compiler with -vec-report3 reports for line 35:
remark: loop was not vectorized: existence of vector dependence.
In the 14.0.1 compiler, no yea or nay is given about the vectorization of the loop starting on line 35. This poses no problem in the attached test case as the output is exactly as expected. I though that perhaps the lack of vector reporting may have something to do with the issue I'm seeing in the code from which the attached test case was derived. In that code, the analogue of array "x" is set to 6 and 7 in the "condition == .false." branch of the code as well, however in a debugger, the 6 is placed outside the bounds of the array:
(gdb) x/2i $rip => ....: movl $0x6,0x15f04b84(%rdi) ....: movl $0x7,0x15f04b88(%rdi,%rax,4) (gdb) p $rdi = 64 (gdb) p $rax = 0 (gdb) p &x = (PTR TO -> (INTEGER(4) (0:15,0:15))) 0x15f04bc8
The movl destination for 0x6 comes out to 0x15f04bc4 which is smaller than the start of the array. This issue does not occur if optimization is disabled.
Can anyone shed any light on what's happening here?
Thanks,
Phil Bailey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Absence of a report about vectorization is a typical symptom of dead code elimination. In the long distant past, when compiler vendors tried to provide reports on dead code elimination, customers said they didn't want those reports.
I suppose it's hard to follow across eliminated dead code in a debugger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The optimization report generated by option "-opt-report" or "-opt-report-file" can tell what happened to loop at line 35:
<vectorize.f90;35:36;hlo_opt_pred;MAIN__;0>
Condition at line 36 hoisted from loop at line 35
......
<vectorize.f90;35:35;hlo_unroll;MAIN__;0>
Loop at line 35 peeled iterations: 1 (pre-vector)
Here the if statement at line 36 was brought outside the loop and then the loop iteration was reduced to only 1 so there is no longer vectorization report for it.
For the debug output I had a try using the test case and found different output:
(gdb) x/2i $rip
=> 0x402cf3 <p+307>: movl $0x6,0x29ca07(%rip) # 0x69f704 <a_mp_x_+4>
0x402cfd <p+317>: movl $0x7,0x29c9f9(%rip) # 0x69f700 <a_mp_x_>
(gdb) p &x
$1 = (PTR TO -> ( INTEGER(4) (16,5))) 0x69f700
Are you using the same options as in the attached makefile?
Thanks,
Xiaoping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have reproduced the error and opened a bug report for it: DPD200254997
Thanks,
Xiaoping

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page