http://llvm.org/bugs/show_bug.cgi?id=20895

            Bug ID: 20895
           Summary: documentation bug: select should not have a value
                    dependence on the not-selected operand
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

This PR is in reference to this discussion:

http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076592.html

Basically, the LLVM IR doc implies that "select" has a value dependence on its
operands, which makes it legal to optimize a select into undef if its
not-selected operand is poisoned. This doesn't seem to make too much sense and
also it appears to be at odds with the current LLVM implementation.

My suggested fix to the LLVM Language Reference Manual is to put this text in
the value dependence part of the poison value explanation:

* Values other than phi nodes and select instructions depend on their operands.

* Phi nodes depend on the operand corresponding to their dynamic predecessor
basic block.

* Select instructions depend on their selected operand.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to