[LLVMbugs] [Bug 21148] New: Induction Variable Simplification Pass promotes i32 operations to i64

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 3 07:13:10 PDT 2014


            Bug ID: 21148
           Summary: Induction Variable Simplification Pass promotes i32
                    operations to i64
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: tstellar at gmail.com
                CC: atrick at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13130
  --> http://llvm.org/bugs/attachment.cgi?id=13130&action=edit
Test Case

I've run into the issue where the Induction Variable Simplification Pass will
promote i32 operations to i64, which negatively impacts performance on AMDGPU

The problem occurs when the induction variable is used for address calculations
of pointers with different sizes.   For example:

kernel void test(global int *out, int a) {

  private int array[16];
  for (int i = 0; i < 16; i++)
    out[i * 3 + a] = array[i];

Here global pointers are 64-bit and private pointers are 32-bit.  In this case
the indvars pass tries to promote the induction variable to 64 bits which
causes the address calculations for the out pointer to be 64-bit operations.

I've attached an LLVM IR test case the demonstrates the issue.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141003/877ce4f0/attachment.html>

More information about the llvm-bugs mailing list