Resolved Bug 26412.
https://llvm.org/bugs/show_bug.cgi?id=26412
Details
Diff Detail
Event Timeline
The patch LGTM.
Can you please move the comment above the line? I think it would make the code easier to follow.
Just one minor suggestion, Amjad. Otherwise, LGTM.
test/CodeGen/X86/x86-interrupt_vzeroupper.ll | ||
---|---|---|
8 | This command line comment seems incorrect, since nehalem doesn't have feature AVX. Maybe you should change this to sandybridge (here and on lines 35-36)? |
lib/Target/X86/X86VZeroUpper.cpp | ||
---|---|---|
190 | The name doesn't seem appropriate anymore, but I can't say I have a better idea. | |
test/CodeGen/X86/x86-interrupt_vzeroupper.ll | ||
36–42 | 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. |
Sorry to be a nag, but the testcase can be simplified even further:
; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s ; CHECK: vzeroupper ; CHECK-NEXT: call ; CHECK-NOT: vzeroupper ; CHECK: iret define x86_intrcc void @foo(i8* %frame) { call void @bar() ret void } declare void @bar()
FWIW, I also don't think the C reproducer adds any value, but if you think otherwise feel free to keep it!
The name doesn't seem appropriate anymore, but I can't say I have a better idea.