[llvm-bugs] [Bug 41079] New: immarg operand has non-immediate parameter error after r355981

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 14 18:10:46 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41079

            Bug ID: 41079
           Summary: immarg operand has non-immediate parameter error after
                    r355981
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: douglas_yung at playstation.sony.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

After upstream commit r355981, one of our internal tests started hitting an
error during compilation with optimizations enabled:

/* 1.cpp */
int test(int stuff)
{
    int res = 0;

    switch(__builtin_expect(stuff, stuff)) {
    case 0:
        res = 1;
        break;
    default:
        break;
    }
    return res;
}

$ clang -c -O2 1.cpp
immarg operand has non-immediate parameter
  %conv1 = sext i32 %2 to i64
  %expval = call i64 @llvm.expect.i64(i64 %conv, i64 %conv1)
in function _Z4testi
fatal error: error in backend: Broken function found, compilation aborted!
clang-9: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 9.0.0 (trunk 355981)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/dyung/src/upstream/355981-linux/bin

-- 
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/20190315/70135291/attachment.html>


More information about the llvm-bugs mailing list