[LLVMdev] Handling Masked Vector Operations
dag at cray.com
dag at cray.com
Thu May 2 10:12:04 PDT 2013
Nadav Rotem <nrotem at apple.com> writes:
> For DIV/MOD you can blend the inputs BEFORE the operation. You can
> place ones or zeros depending on the operation.
Quick follow-up on this. What about using "undef" as the input for
false items:
tv1 = select mask, v1, undef
tv2 = select mask, v2, undef
tv3 = div tv1, tv2
v3 = select mask, tv3, undef
I'm always confused about the semantics of undef. Is the above safe
code? It would simplify things a bit not to have to track which input
values are safe based on the context of an operation.
-David
More information about the llvm-dev
mailing list