- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What are the sideeffects of LEA instruction ?
I am seeing a fairly large number of CPU cycles attributed to LEA, which is used to compute &ARRAY[base+i*stride+j]. Does the computed address cause a cache fault ?
thank you
Vladimir Dergachev
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
lea cannot cause a cache miss, because it does not perform a memory access. It is just doing arithmetic on registers. If you are seeing a lot of time attributed to lea operations, then it is probably caused by dependency stalls in the in-order pipe (so cases where the lea is using as input a register whose value was modified in the previous instruction).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ahh, thank you ! I was not sure how much of mov functionality was retained. Is the latency information available anywhere ? I'd like to understand where the stalls are coming from - in some cases lea had a lot of time attributed to it, even though neighbouring instructions with similar dependency levels had much lower time.
Could this be due to difficulty sharing lea hardware between four threads ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The best tool to identify such stalls is VTune (http://software.intel.com/en-us/intel-vtune-amplifier-xe) or a simliar tool.
Regards
--
Taylor

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