[llvm-bugs] [Bug 24719] New: PowerPC: SelectBitfieldInsert is buggy

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 5 03:16:47 PDT 2015


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

            Bug ID: 24719
           Summary: PowerPC: SelectBitfieldInsert is buggy
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: anton at samba.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following testcase:

#include <stdio.h>

int a;
int d = 15;
int *b = &d;

signed char fn1(int p1, int p2)
{
    return p1 >> p2;
}

int main(void)
{
    char c;

    for (c = 0; c < 2; c++) {
        unsigned int d = 2072;

        *b |= d <= fn1(d, !a);
    }

    printf("%d\n", *b);

    return 0;
}

built with -O1 prints 15, but built with -O2 prints 0.

My guess is SelectBitfieldInsert has issues, perhaps similar to PR24704.

-- 
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/20150905/db3332b9/attachment.html>


More information about the llvm-bugs mailing list