search for: emitmul

Displaying 1 result from an estimated 1 matches for "emitmul".

Did you mean: emitfmul
2015 Aug 11
2
NSW and ExtLdPromotion()
...by the combination of nsw flag and ExtLdPromotion, I am leaning to say Clang set nsw flag incorrectly, but please let me know if I was wrong. Here is the reduced testcase: long long foo(int *a) { long long c; c = *a * 1405; return c; } Clang emitted the following IR (It is done by EmitMUL() in CGExprScalar.cpp, while CGF.getLangOpts().getSignedOverflowBehavior()=LangOptions::SOB_Undefined and CGF.SanOpts.has(SanitizerKind::SignedIntegerOverflow)=false): ; Function Attrs: nounwind readonly define i64 @foo(i32* nocapture readonly %a) #0 { entry: %0 = load i32* %a, align 4, !t...