[PATCH] Fix for PR20059 (instcombine reorders shufflevector after instruction that may trap)

Sanjay Patel spatel at rotateright.com
Wed Jul 9 09:52:50 PDT 2014


Thanks, Arnold. 

I've committed the fix for int ops, but I'm still doubtful that this is safe for FP (any FP)...because any FP op can cause an exception, right? We don't normally have exceptions enabled for FP div-by-zero, denorms, underflow, etc (especially for vector ops), but a system or user can certainly enable those manually. If that is true and one of the unknown operands in the vector is bad in some way, then we'll generate an exception that wouldn't have occurred without this optimization. I suppose I can generate a C test case to prove this by twiddling the FP exception bits.

http://reviews.llvm.org/D4424






More information about the llvm-commits mailing list