[PATCH] D17542: Disallow generating vzeroupper before return instruction (iret) in interrupt handler function
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 14:26:32 PST 2016
ab added a subscriber: ab.
================
Comment at: lib/Target/X86/X86VZeroUpper.cpp:187
@@ -185,1 +186,3 @@
+ // epilogue will restore YMM registers if needed.
+ bool isControlFlow = MI->isCall() || (MI->isReturn() && !IsX86INTR);
----------------
The name doesn't seem appropriate anymore, but I can't say I have a better idea.
================
Comment at: test/CodeGen/X86/x86-interrupt_vzeroupper.ll:35-41
@@ +34,8 @@
+
+attributes #0 = { nounwind uwtable "disable-tail-calls"="true" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "stackrealign" "target-cpu"="nehalem" "target-features"="+avx,+cx16,+fxsr,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,-3dnow,-3dnowa,-mmx" "unsafe-fp-math"="false" "use-soft-float"="true" }
+attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="nehalem" "target-features"="+avx,+cx16,+fxsr,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #2 = { nounwind }
+
+!llvm.ident = !{!0}
+
+!0 = !{!"clang version 3.9.0 (trunk 259349) (llvm/trunk 259357)"}
----------------
Can you simplify the test? The metadata and most attributes aren't necessary, and the remaining attributes (target-features) can be replaced with -mattr=+avx in the command line.
http://reviews.llvm.org/D17542
More information about the llvm-commits
mailing list